search-benchmark-game icon indicating copy to clipboard operation
search-benchmark-game copied to clipboard

Add filtered queries.

Open jpountz opened this issue 1 year ago • 4 comments

This is an alternative to #63 that adds filtered queries instead of new filtering commands.

Queries support optional filtering via the following syntax: " WHERE ", so engines can split on " WHERE " and interpret the left part as a required clause that computes scores and the right part as a filter. Only the Lucene 10 engines support this for now.

jpountz avatar Nov 18 '24 09:11 jpountz

Thanks for the PR. I think we could make the handling slightly simpler when we move the WHERE clause to and extra "filter" field next to "query". What do you think?

PSeitz avatar Nov 19 '24 04:11 PSeitz

Can you explain a bit more what you have in mind? It was convenient to avoid introducing a third column in the protocol that src/client.py uses to submit queries to engines, or in the results web page. And then I kept the queries.txt file the same for consistency.

jpountz avatar Nov 19 '24 18:11 jpountz

Can you explain a bit more what you have in mind? It was convenient to avoid introducing a third column in the protocol that src/client.py uses to submit queries to engines, or in the results web page. And then I kept the queries.txt file the same for consistency.

I was thinking the API with a third "filter" parameter would be a little bit clearer. For the results we could still have a single column with query + "WHERE " + filter

PSeitz avatar Nov 20 '24 03:11 PSeitz

@PSeitz I looked into your suggestion, but having different formats in the queries.txt and the results file while doing the conversion in src/client.py looks a bit awkward. It's possible that I misunderstood your suggestion, if so I'd appreciate if you could describe how you expect queries to look like in queries.txt, results.json and in the protocol that is used between src/client.py and the engines.

jpountz avatar Nov 25 '24 17:11 jpountz