Handling Multiple Dates Search with Unix Timestamp in Int64
TLDR Akashchellakumar asked how to search multiple dates with Unix timestamp in int64. Kishore Nallan suggested inter-field filtering and storing timestamps as array of int64 or strings. Akashchellakumar thanked and agreed to try this method.
1
Oct 12, 2022 (12 months ago)
Akashchellakumar
06:59 AMHow to handle multiple dates search using Unix timestamp with int64 data type?
Example :
• I have two different booked date slots for the car rental document (Oct 1 to Oct 10
Oct 21 to Oct 30).
• I need to fetch the same car rental document which is available on the specific date(Oct 11 to Oct 20).
Kishore Nallan
07:13 AMAkashchellakumar
07:21 AMKishore Nallan
07:27 AMKishore Nallan
07:30 AMThen when you search for the availability of a given date, you have to do != search.
Kishore Nallan
07:30 AMKishore Nallan
07:30 AMKishore Nallan
07:31 AM"timestamps": ["A", "C", "D"]
where a, c, and d are timestamps as string. Now if you want to check availability for "B", you will do
filter_by=timestamps:!=B
Akashchellakumar
07:37 AM1
Typesense
Indexed 2779 threads (79% resolved)
Similar Threads
Using Multisearch To Filter String Timestamps
Farid asked how to filter string timestamps with multisearch. Kishore Nallan advised indexing the timestamps as int64 for comparison.
UNIX Timestamps and Search Condition Operators
Eshwar asked about using `<=` `>=` operators for a date field search option. Jason confirmed the operators but asked for curl commands to replicate the issue.
Fuzzy Search Restrictions and num_typos Extension Request
Ashwin seeks to limit the fields covered by fuzzy search and wants specification of typo tolerance per field. Kishore Nallan suggests num_typos syntax to control the behavior, with Ashwin agreeing and planning to raise a related issue on Github. Jason advises on comparing integer time stamps for InstantSearch usage.
Efficient Method to Find Records at Interval Timestamps
Dan asked for an efficient method for counting frequency of record intervals. Jason suggested using multi_search or creating a new field for each record.
Multiple Filters and JSON Requests in Typesense
Manish asked about multiple filter_by arguments, JSON input, and using multisearch. Jason offered typesense documentation links, examples, and how to use JSON formatted requests with multisearch. Ed shared a similar use case.