0

For Solr 3.6. I want to query Solr data for one of the faceted field for a filtering white space " " as a value, but I doesn't know how to do it? I have tried several times with white space, ' ' & " " but none of them work. There is a data document with white space in Solr which it shows in facet count, but filtering on it doesn't work and gives error.

Here is the example query I'm trying:

http://localhost:8983/solr/core-live/select/?q=CategoryID%3A113&version=2.2&start=0&rows=10&indent=on&facet=true&facet.field=f_brand&&facet.mincount=1&facet.field=f_wi-fi&fq=f_wi-fi:yes

This filters document with Yes, notice the fq with f_wi-fi:yes. I want to know how to filter documents with white spaces.

Krunal
  • 2,967
  • 8
  • 45
  • 101
  • 1
    Can you share your schema file with the datatype for the field you want to filter on? – Evan Aug 25 '12 at 19:07
  • I think you didn't understand my question clearly. I do not have any problem filtering on any faceted field. Filtering works fine, but I'm unable to filter for white space as " " for any faceted field. I just want to know how to write query that filters f_wi-fi=" " <-- white space. It works correctly when I write yes, no or any other value. Or may be there is something else wrong. Let me know, i'll be able to share you some portion of schema file tomorrow. – Krunal Aug 26 '12 at 05:28
  • Can you check if the document f_wi-fi is stored with the white space value. I think the field if without any value will not be stored and if so you can easily use a negative query to get the results. – Jayendra Aug 26 '12 at 12:02
  • 1
    @Krunal - I understand your question, my thought was that the data type of the field is configured to remove whitespace for the query analyzer. If you don't want to share your schema, I encourage you to click analysis on the admin page to investigate. http://localhost:8080/solr/admin/analysis.jsp – Evan Aug 26 '12 at 20:26
  • Please refer to this link: [Solr Query with white space][1] [1]: http://stackoverflow.com/questions/5790180/solr-query-with-white-space – Campinho Mar 12 '13 at 16:52

0 Answers0