SOLR “LIKE” query syntax for non-string data type?

I'm not sure why you'd want to do wildcard searches against numbers. But if you need to maybe you could store the numbers in a text field and run your wildcard queries against that Probably what you actually want to do is a range query on your number fields. Something like: price:17 TO * ' 17 or higher price:17 TO 18 ' between 17 and 18 (inclusive) See SolrQuerySyntax If this doesn't help, maybe let us know what you're trying to accomplish.

I'm not sure why you'd want to do wildcard searches against numbers. But if you need to maybe you could store the numbers in a text field and run your wildcard queries against that. Probably what you actually want to do is a range query on your number fields.

Something like: price:17 TO * ' 17 or higher price:17 TO 18 ' between 17 and 18 (inclusive) See SolrQuerySyntax If this doesn't help, maybe let us know what you're trying to accomplish.

I'm making a search function now. If I input something in a text field (e. G 45000), then I use SOLR to get all field that contain the input, no matter the data type is string or number.

I wish you could help me,thanks. – Praditha Nov 15 at 2:44 I'm not sure what you mean here. Please be clear on what you're trying to accomplish and what you've tried and I will try to help – brian519 Nov 15 at 13:57 I've a text field that will be used by the user to enter keywords and search button to do search action.In my docs, for example I have 3 fields, price (float), name (string) and description (string).

When user enter the keywords and then click search button to do the action, it will search all field of docs that contain these keywords. So, I use wildcard to do this.It's works for string data type, but not on float data type. In my search action, I use loop to search in every field on each docs.

I hope you can understand what I mean,. – Praditha Nov 16 at 3:14 Why do you need to use wildcards? Note that if you're using the dismax query parser, searching for description:*home* is the exact same as description:home This is because the *'s are stripped out, dismax does not support wildcards.

Look in your solrconfig. Xml file for dismax. – brian519 Nov 16 at 13:46.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions