Chris
Chris

Reputation: 18884

Solrj Query Dynamic Field

In Solrj (Solr 3.6), am I able to filter my search for a dynamic field:

params.set("fl", "name*_s");

Or do I still need to copy this field to a new field (non-dynamic) in order to search it?

Thank you in advance.

Upvotes: 0

Views: 676

Answers (1)

ThoughtfulHacking
ThoughtfulHacking

Reputation: 1309

params.set("fl", "name*_s");

I don't think you can do this in 3.6. At least, the patch is labelled as "Fix Version/s: 4.0"

Now, you can still retrieve a value from a specific dynamic field, like "name123_s" by naming it directly.

But I'm not sure if I'm answering the right question, as "fl" isn't involved in filtering, or searching. "fl" is the list of stored fields to return.

If you want to search multiple fields, you should look at the "qf" parameter of the edismax query parser.

Upvotes: 1

Related Questions