koursaros-ai/nboost

nboost + elasticsearch query dsl support

Closed this issue · 2 comments

Hey,

I was able to make this to work on a very simple test using lucene search syntax, does nboost support query dsl format?, thanks much appreciated it!

we use jsonpath for the following flags on nboost, which gives almost total flexibility to extract the query and candidates from any json object (even if it wasn't elasticsearch).

I've never used query DSL but my understanding it that it's json based and thus would probably work with this. We can help with the specific implementation.

  --capture_path CAPTURE_PATH      the url path to tag for reranking via nboost
  --query_path QUERY_PATH          the jsonpath in the request to find the query
  --topk_path TOPK_PATH            the jsonpath to find the number of requested results
  --cvalues_path CVALUES_PATH      the jsonpath to find the string values of the choices
  --cids_path CIDS_PATH            the jsonpath to find the ids of the choices (for benchmarking)
  --true_cids_path TRUE_CIDS_PATH  the path of the true choice ids in the request
  --choices_path CHOICES_PATH      the jsonpath to find the array of choices to reorder

I just added new documentation for the dsl. You can find it here.