Question

I have table "class". This class has a field: "numStudents". I indexed numStudents field.

Now I want to search all classes have numStudents = 10, for example. How can I do this?

Please give me easiest way, modify solrconfig.xml or schema.xml is good for me. Thanks!

Was it helpful?

Solution

You probably want to filter out all the classes which has 10 students without actually scoring the documents.
You can use the Filter Query fq=numStudents:10 to filter out the classes.
FilterQuery is able to take advantage of the FilterCache, which would be a huge performance boost in comparison to your queries.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top