koursaros-ai / nboost

NBoost is a scalable, search-api-boosting platform for deploying transformer models to improve the relevance of search results on different platforms (i.e. Elasticsearch)
Apache License 2.0
675 stars 69 forks source link

Custom field search #16

Closed marcoaleixo closed 4 years ago

marcoaleixo commented 4 years ago

I'm trying to use another field than "passage" to search, its not possible yet?

http://localhost:8000/drbusiness-013c9/_search?pretty&q=original_answer:law&size=2

I receive the error -

{ "error": "KeyError('passage',)" }

But when I use the same search on Kibana I receive my results.

colethienes commented 4 years ago

Hi Marco,

Have you tried using the --field switch?

Let me know if that works! 😊

marcoaleixo commented 4 years ago

Yeah, worked. But why we need to fix this with --field parameter? I have some indexes being created in execution time, for example.

colethienes commented 4 years ago

My thinking was that there could be multiple fields. However, I'm assuming that you're recommending getting the field from whatever field the user is querying at runtime?

marcoaleixo commented 4 years ago

Exactly!

colethienes commented 4 years ago

Okay sounds good to me. NBoost will try to detect the field by default, but can be overriden by --field. I'll include it in the next version.