OK, what _request handler_ are you using? what is the original query?

On Fri, May 5, 2017 at 11:42 AM, Aman Deep Singh
<amandeep.coo...@gmail.com> wrote:
> Hi Erick,
> I don't want to do the range query ,
> That is why I'm using the pattern replace filter to remove all the non
> alphanumeric to space so that this type of situation don't arrive,Since end
> user can query anything, also in the query I haven't mention any range
> related keyword (TO).
> If my query is like [64GB/3GB] it works fine and doesn't convert to range
> query.
>
> Thanks,
> Aman deep singh
>
> On 06-May-2017 12:04 AM, "Erick Erickson" <erickerick...@gmail.com> wrote:
>
> I'm going to go a little sideways and claim this is an "XY" problem,
> the range bits are a side-issue. The problem is that you're trying to
> do ranges on textual data that are really numbers. So even if there's
> a way to fix the range issue you're talking about, it still won't do
> what you expect.
>
> Consider
> [3000000 TO 4] is perfectly valid for _character_ based data. At least
> it'll match values like 31, 32, 399999. That's not what a numeric sort
> would expect though. If you really want to search on numeric ranges,
> you'll have to split the value out to something that's really numeric.
>
> Best,
> Erick
>
> On Thu, May 4, 2017 at 10:55 PM, Aman Deep Singh
> <amandeep.coo...@gmail.com> wrote:
>> Hi,
>> I'm facing a issue when i'm querying the Solr
>> my query is "xiomi Mi 5 -white [64GB/ 3GB]"
>> while my search field definition is
>>
>>   <fieldType name="text_word_delimiter" class="solr.TextField"
>> autoGeneratePhraseQueries="false" positionIncrementGap="100">
>>     <analyzer type="index">
>>       <tokenizer class="solr.WhitespaceTokenizerFactory"/>
>>       <filter class="solr.PatternReplaceFilterFactory"
>> pattern="[^\dA-Za-z ]" replacement=" "/>
>>       <filter class="solr.WordDelimiterFilterFactory"
>> catenateNumbers="1" generateNumberParts="1" splitOnCaseChange="1"
>> generateWordParts="1" preserveOriginal="1" catenateAll="1"
>> catenateWords="1"/>
>>       <filter class="solr.LowerCaseFilterFactory"/>
>>     </analyzer>
>>     <analyzer type="query">
>>       <tokenizer class="solr.StandardTokenizerFactory"/>
>>       <filter class="solr.ManagedSynonymFilterFactory"
> managed="synonyms_gdn"/>
>>       <filter class="solr.PatternReplaceFilterFactory"
>> pattern="[^\dA-Za-z _]" replacement=" "/>
>>       <filter class="solr.WordDelimiterFilterFactory"
>> catenateNumbers="0" generateNumberParts="1" splitOnCaseChange="1"
>> generateWordParts="1" splitOnNumerics="1" preserveOriginal="0"
>> catenateAll="0" catenateWords="0"/>
>>       <filter class="solr.LowerCaseFilterFactory"/>
>>     </analyzer>
>>   </fieldType>
>>
>>
>> My generated query is
>>
>>
>> +(((Synonym(nameSearch:xiaomi nameSearch:xiomi)) (nameSearch:mi)
>> (nameSearch:5) -(Synonym(nameSearch:putih
>> nameSearch:white))*(nameSearch:[64gb/ TO 3gb])*)~4)
>>
>>
>> Now due to automatic conversion of query  to Range query i'm not able
>> to find the result
>>
>>
>> Solr Version-6.4.2
>>
>> Parser- edismax
>>
>> Thanks,
>>
>> Aman Deep Singh

Reply via email to