TheMP
TheMP

Reputation: 8427

Elastic - Determining which field to query based on it's value

Sorry if the question seems newb, I'm quite new to elastic.

I have a custom UI with user input field where users inputs his search and runs search over one index. I want to determine which field should I query based on user input whenever possible.

Example scenario: User inputs 18 -> I want to filter on age field. User inputs "Joe" -> I want to filter on name field, "developer" -> filter on job field. Moreover it would be awesome if ">18" would be interpreted as range query on age.

Would something like that be possible with just using elastic API or do I need a custom parsers/analyzer?

Upvotes: 0

Views: 58

Answers (2)

Mohammad Hatami
Mohammad Hatami

Reputation: 289

No it doesnot exist. but for simple use:

if u use .net--> u can use somthing like NEST

or for Java--> u can use something like Java API [6.5] » Client

or...

Upvotes: 0

LeBigCat
LeBigCat

Reputation: 1770

No it doesnot exist. The concept of Elastic is to build your own search engine. So you have also to specify what to search and how. I dont know witch langage (and so client) you use, but it s very easy to split the different field and make different standard search class for each one.

Upvotes: 0

Related Questions