Solr search query for dynamic fields indexed

Selwyn picture Selwyn · Jun 2, 2011 · Viewed 14.5k times · Source

I am implementing the solr search in my project . I have one question regarding how do i search a dynamic fields that is created in a solr index Eg:- this is the tag that is formed in the index

And I am trying to search from solr using this query Employee_* = 172

Please help me in this if the way of searching is incorrect.

Answer

Mauricio Scheffer picture Mauricio Scheffer · Jun 2, 2011

In your queries, you need to define exactly what concrete fields you want to search, e.g. Employee_a, Employee_b (or whatever dynamic fields you've used). You can't search in all dynamic fields by using wildcards in a field name in queries.