Log
-
Drop support for plaintext queries by Caio 5 years ago
-
Use a single .gitignore by Caio 5 years ago
-
Fix the ordering logic 💬 by Caio 5 years ago
Integration tests are way overdue eh :x
-
SearchQuery: Deny unknown fields 💬 by Caio 5 years ago
Save me from myself
-
Only give a cursor if it will yield results 💬 by Caio 5 years ago
Perhaps `has_next` should live inside the collector result...
-
Adapt to the new ConditionalTopCollector format by Caio 5 years ago
-
ConditionalTopCollector now yields CollectionResult 💬 by Caio 5 years ago
When doing conditional collection it's quite common to want to know how often the condition passed or not. This patch introduces a new CollectionResult type that contains the following: * items: The topK found items * total: number of items seen in the index * visited: number of items that passed the given condition
-
Add support for pagination 💬 by Caio 5 years ago
This patch uses a `(u64,u64)` tuple as a cursor representing score and recipe_id for pagination. Score is converted to the appropriate type accordingly (f64 will come along with overall support for floats) The next step would be wrapping this into something that avoids exposing the internal recipe_id publicly (a simple translation to uuid will suffice), though I'm not particularly worried about exposing these ids...
-
Disconnect BincodeDatabase from Cantine 💬 by Caio 5 years ago
Now that I can defer touching the database until rendering time, I expect it will be a lot easier to juggle it separately when I start dispatching tasks to different executors.
-
Organize imports by Caio 5 years ago
-
Use snake_case to (De)Serialize model::Sort by Caio 5 years ago
-
Allow sorting by calories by Caio 5 years ago
-
Parameterize the aggregation threshold by Caio 5 years ago
-
Read queries from stdin 💬 by Caio 5 years ago
This makes it easier to drive from a shell
-
Aggregate via a serialized Features bytes field 💬 by Caio 5 years ago
This patch switches back to storing a serialized version of the recipe Features payload into the index.
-
Use generated collector, aggregate conditionally 💬 by Caio 5 years ago
Now we're getting cute. Querying for "potato" recipes under 225 kcal and counting the number of ingredients in 3 buckets: ```sh $ ./query -b /DATA/ '{"num_items": 3, "fulltext": "potato", "filter": { "calories": [0, 225]}, "agg": { "num_ingredients": [[0,6], [5,11], [10,254]] } }' -n 3 ``` Yields this json to stdout (prettified for this log): ```json { "items": [ { "name": "Bloomin' Baked Potato", "uuid": "34861ded-d21e-587a-aaa3-bbd97dc29e5d", "crawl_url": "https://www.kraftcanada.com/recipes/bloomin-baked-potato-185790", "num_ingredients": 3, "instructions_length": 753, "calories": 180 }, { "name": "5 Tips For Baking The Perfect Sweet Potato", "uuid": "5fbdbf16-444f-54c2-b861-ab818b045979", "crawl_url": "https://www.healingtomato.com/5-tips-for-baking-sweet-potato/", "num_ingredients": 2, "instructions_length": 603, "total_time": 50, "calories": 191 }, { "name": "Easy Broiled Potato Skins With Scallions", "uuid": "7ef5a1da-d2bc-56ce-ac35-8fafa7272e80", "crawl_url": "https://www.thespruceeats.com/broiled-potato-skins-with-scallions-3050701", "num_ingredients": 6, "instructions_length": 1154, "total_time": 14, "calories": 164 } ], "total_found": 5707, "agg": { "num_ingredients": [ 832, 3210, 2555 ] } } ```
-
Rename SearchQuery.filters to filter 💬 by Caio 5 years ago
And sneak a derive reorder because hey!
-
Add more serde attributes to generated structs by Caio 5 years ago
-
Derive a (tantivy) Collector for the aggregations by Caio 5 years ago
-
Remove unneeded tests by Caio 5 years ago
-
Add support for sorting by unsigned features 💬 by Caio 5 years ago
The rest will have to wait for tantivy 0.11 - support has landed on master already and I'm really not looking forward to dancing more with numeric conversions.
-
Don't make floats FAST for now 💬 by Caio 5 years ago
Tantivy 0.10 allows setting the flag for f64 fields but crashes when merging since it doesn't actually support it with: > thread 'mergingthread-0' panicked at 'Failed to find a reader for single > fast field. This is a tantivy bug and it should never happen.',
-
Adjust calories to u32 💬 by Caio 5 years ago
So cantine_derive is actually paying off because I blursed the new model by making calories a float Hue
-
Make the fields FAST, so they can be used for sort by Caio 5 years ago
-
Assemble the search query assisted by cantine_derive 💬 by Caio 5 years ago
Aww yiss
-
Build the index through cantine_derive's output 💬 by Caio 5 years ago
Now that we can read, create and populate fields from generated code, all the annoying wiring business logic is hidden. I'm very unhappy with the fact that I have to address the generated struct directly (FeaturesFilterFields), but that can be solved easily with a trait later on I think.
-
Simplify the interpret_code generation 💬 by Caio 5 years ago
So I can compose with quote!'ed things. nice.
-
Implement FilterFields::add_to_doc(doc,feat) 💬 by Caio 5 years ago
Now it's also very easy to drive the index creation part from these generated structs.
-
Use the declared types for FilterQuery 💬 by Caio 5 years ago
This patch makes sure the derived public FilterQuery type uses the exact same types as the ones in the struct being derived.
-
Teach FilterFields to interpret FilterQuery 💬 by Caio 5 years ago
I can't seem to come up with a way to express this via a bunch of traits, but it looks like it would be possible...