Re: unordered autocomplete search

2017-09-05 Thread Niraj Aswani
Hi Mikhail,

Thank you so much for your inpu. I am looking into this and let you know
when I've tried this.

@Walter: indeed, it should be included :). If my code works, I'll post it
here.

Many thanks,
Niraj

On Mon, Sep 4, 2017 at 5:27 PM, Walter Underwood 
wrote:

> This should probably be a feature of the analyzing infix suggester.
>
> Right now, the fuzzy suggester is broken with the file dictionary, so we
> can’t use fuzzy suggestions at all.
>
> wunder
> Walter Underwood
> wun...@wunderwood.org
> http://observer.wunderwood.org/  (my blog)
>
>
> > On Sep 4, 2017, at 4:50 AM, Mikhail Khludnev  wrote:
> >
> > You probably can override AnalyzingInfixSuggester.finishQuery(Builder,
> > boolean) where you can rip clauses from builder and change TermQueries/
> > PrefixQuery to FuzzyQueries. Let me know how it works, please.
> >
> > On Mon, Sep 4, 2017 at 2:27 PM, Niraj Aswani 
> wrote:
> >
> >> Hi Mikhali,
> >>
> >> Thank you very much for your quick response.
> >>
> >> This does seem to fix the issue of unordered words in the autocomplete,
> >> however, then I loose the capability of matching misspelled words.
> >>
> >> Is there anything that can be done to combine the functionality of the
> two?
> >>
> >> Regards,
> >> Niraj
> >>
> >>
> >>
> >> On Mon, Sep 4, 2017 at 11:13 AM, Mikhail Khludnev 
> wrote:
> >>
> >>> The first question is, "sourceLocation">test.dict makes sense?
> >>> Then, for me, it looks like a case for AnalyzingInfixLookupFactory
> >>> https://lucidworks.com/2015/03/04/solr-suggester/ rather than
> >>>
> >>>   - The FuzzyLookupFactory that creates suggestions for misspelled
> words
> >>>   in fields.
> >>>
> >>>
> >>>
> >>>
> >>> On Mon, Sep 4, 2017 at 11:57 AM, Niraj Aswani 
> >>> wrote:
> >>>
> >>>> Hi,
> >>>>
> >>>> I am using solr 5.5.4.
> >>>>
> >>>> I would like to perform an unordered autocomplete search however it
> >> seems
> >>>> that it only suggests phrases that start with my term in the query.
> >>>>
> >>>> For example, in my dictionary I have,
> >>>>
> >>>> *lamp desk*
> >>>>
> >>>> When searching for the term "lamp", it is able to show the the
> >> suggestion
> >>>> "lamp desk" as the suggestion is starting with the word "lamp".
> >> However,
> >>>> when I search for the term "desk", it doesn't show any suggestion.
> >>>>
> >>>> My field in the *managed-schema* is as below:
> >>>>
> >>>>  >>>> positionIncrementGap="100">
> >>>>  
> >>>>
> >>>>
> >>>>  
> >>>>  
> >>>>
> >>>>  
> >>>> 
> >>>>
> >>>> My controller in *solconfig.xml* is defined as the following:
> >>>>
> >>>> 
> >>>> 
> >>>>  
> >>>>default
> >>>>FuzzyLookupFactory
> >>>>test.dict
> >>>>suggest_field
> >>>>  
> >>>> 
> >>>>
> >>>>  >>> startup="lazy">
> >>>>  
> >>>>true
> >>>>10
> >>>>  
> >>>>  
> >>>>suggest
> >>>>  
> >>>> 
> >>>>
> >>>> The *query* I fire is:
> >>>>
> >>>> http://localhost:8983/solr/core1/suggest?q=desk&suggest.build=true
> >>>>
> >>>> is there anyway, I can get the above scenario working?
> >>>>
> >>>> Many thanks,
> >>>> Niraj
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> Sincerely yours
> >>> Mikhail Khludnev
> >>>
> >>
> >
> >
> >
> > --
> > Sincerely yours
> > Mikhail Khludnev
>
>


Re: unordered autocomplete search

2017-09-04 Thread Walter Underwood
This should probably be a feature of the analyzing infix suggester. 

Right now, the fuzzy suggester is broken with the file dictionary, so we can’t 
use fuzzy suggestions at all.

wunder
Walter Underwood
wun...@wunderwood.org
http://observer.wunderwood.org/  (my blog)


> On Sep 4, 2017, at 4:50 AM, Mikhail Khludnev  wrote:
> 
> You probably can override AnalyzingInfixSuggester.finishQuery(Builder,
> boolean) where you can rip clauses from builder and change TermQueries/
> PrefixQuery to FuzzyQueries. Let me know how it works, please.
> 
> On Mon, Sep 4, 2017 at 2:27 PM, Niraj Aswani  wrote:
> 
>> Hi Mikhali,
>> 
>> Thank you very much for your quick response.
>> 
>> This does seem to fix the issue of unordered words in the autocomplete,
>> however, then I loose the capability of matching misspelled words.
>> 
>> Is there anything that can be done to combine the functionality of the two?
>> 
>> Regards,
>> Niraj
>> 
>> 
>> 
>> On Mon, Sep 4, 2017 at 11:13 AM, Mikhail Khludnev  wrote:
>> 
>>> The first question is, "sourceLocation">test.dict makes sense?
>>> Then, for me, it looks like a case for AnalyzingInfixLookupFactory
>>> https://lucidworks.com/2015/03/04/solr-suggester/ rather than
>>> 
>>>   - The FuzzyLookupFactory that creates suggestions for misspelled words
>>>   in fields.
>>> 
>>> 
>>> 
>>> 
>>> On Mon, Sep 4, 2017 at 11:57 AM, Niraj Aswani 
>>> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> I am using solr 5.5.4.
>>>> 
>>>> I would like to perform an unordered autocomplete search however it
>> seems
>>>> that it only suggests phrases that start with my term in the query.
>>>> 
>>>> For example, in my dictionary I have,
>>>> 
>>>> *lamp desk*
>>>> 
>>>> When searching for the term "lamp", it is able to show the the
>> suggestion
>>>> "lamp desk" as the suggestion is starting with the word "lamp".
>> However,
>>>> when I search for the term "desk", it doesn't show any suggestion.
>>>> 
>>>> My field in the *managed-schema* is as below:
>>>> 
>>>> >>> positionIncrementGap="100">
>>>>  
>>>>
>>>>
>>>>  
>>>>  
>>>>
>>>>  
>>>> 
>>>> 
>>>> My controller in *solconfig.xml* is defined as the following:
>>>> 
>>>> 
>>>> 
>>>>  
>>>>default
>>>>FuzzyLookupFactory
>>>>test.dict
>>>>suggest_field
>>>>  
>>>> 
>>>> 
>>>> >> startup="lazy">
>>>>  
>>>>true
>>>>10
>>>>  
>>>>  
>>>>suggest
>>>>  
>>>> 
>>>> 
>>>> The *query* I fire is:
>>>> 
>>>> http://localhost:8983/solr/core1/suggest?q=desk&suggest.build=true
>>>> 
>>>> is there anyway, I can get the above scenario working?
>>>> 
>>>> Many thanks,
>>>> Niraj
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> Sincerely yours
>>> Mikhail Khludnev
>>> 
>> 
> 
> 
> 
> -- 
> Sincerely yours
> Mikhail Khludnev



Re: unordered autocomplete search

2017-09-04 Thread Mikhail Khludnev
You probably can override AnalyzingInfixSuggester.finishQuery(Builder,
boolean) where you can rip clauses from builder and change TermQueries/
PrefixQuery to FuzzyQueries. Let me know how it works, please.

On Mon, Sep 4, 2017 at 2:27 PM, Niraj Aswani  wrote:

> Hi Mikhali,
>
> Thank you very much for your quick response.
>
> This does seem to fix the issue of unordered words in the autocomplete,
> however, then I loose the capability of matching misspelled words.
>
> Is there anything that can be done to combine the functionality of the two?
>
> Regards,
> Niraj
>
>
>
> On Mon, Sep 4, 2017 at 11:13 AM, Mikhail Khludnev  wrote:
>
> > The first question is, "sourceLocation">test.dict makes sense?
> > Then, for me, it looks like a case for AnalyzingInfixLookupFactory
> > https://lucidworks.com/2015/03/04/solr-suggester/ rather than
> >
> >- The FuzzyLookupFactory that creates suggestions for misspelled words
> >in fields.
> >
> >
> >
> >
> > On Mon, Sep 4, 2017 at 11:57 AM, Niraj Aswani 
> > wrote:
> >
> > > Hi,
> > >
> > > I am using solr 5.5.4.
> > >
> > > I would like to perform an unordered autocomplete search however it
> seems
> > > that it only suggests phrases that start with my term in the query.
> > >
> > > For example, in my dictionary I have,
> > >
> > > *lamp desk*
> > >
> > > When searching for the term "lamp", it is able to show the the
> suggestion
> > > "lamp desk" as the suggestion is starting with the word "lamp".
> However,
> > > when I search for the term "desk", it doesn't show any suggestion.
> > >
> > > My field in the *managed-schema* is as below:
> > >
> > >  > > positionIncrementGap="100">
> > >   
> > > 
> > > 
> > >   
> > >   
> > > 
> > >   
> > > 
> > >
> > > My controller in *solconfig.xml* is defined as the following:
> > >
> > > 
> > > 
> > >   
> > > default
> > > FuzzyLookupFactory
> > > test.dict
> > > suggest_field
> > >   
> > > 
> > >
> > >  > startup="lazy">
> > >   
> > > true
> > > 10
> > >   
> > >   
> > > suggest
> > >   
> > > 
> > >
> > > The *query* I fire is:
> > >
> > > http://localhost:8983/solr/core1/suggest?q=desk&suggest.build=true
> > >
> > > is there anyway, I can get the above scenario working?
> > >
> > > Many thanks,
> > > Niraj
> > >
> >
> >
> >
> > --
> > Sincerely yours
> > Mikhail Khludnev
> >
>



-- 
Sincerely yours
Mikhail Khludnev


Re: unordered autocomplete search

2017-09-04 Thread Niraj Aswani
Hi Mikhali,

Thank you very much for your quick response.

This does seem to fix the issue of unordered words in the autocomplete,
however, then I loose the capability of matching misspelled words.

Is there anything that can be done to combine the functionality of the two?

Regards,
Niraj



On Mon, Sep 4, 2017 at 11:13 AM, Mikhail Khludnev  wrote:

> The first question is, "sourceLocation">test.dict makes sense?
> Then, for me, it looks like a case for AnalyzingInfixLookupFactory
> https://lucidworks.com/2015/03/04/solr-suggester/ rather than
>
>- The FuzzyLookupFactory that creates suggestions for misspelled words
>in fields.
>
>
>
>
> On Mon, Sep 4, 2017 at 11:57 AM, Niraj Aswani 
> wrote:
>
> > Hi,
> >
> > I am using solr 5.5.4.
> >
> > I would like to perform an unordered autocomplete search however it seems
> > that it only suggests phrases that start with my term in the query.
> >
> > For example, in my dictionary I have,
> >
> > *lamp desk*
> >
> > When searching for the term "lamp", it is able to show the the suggestion
> > "lamp desk" as the suggestion is starting with the word "lamp". However,
> > when I search for the term "desk", it doesn't show any suggestion.
> >
> > My field in the *managed-schema* is as below:
> >
> >  > positionIncrementGap="100">
> >   
> > 
> > 
> >   
> >   
> > 
> >   
> > 
> >
> > My controller in *solconfig.xml* is defined as the following:
> >
> > 
> > 
> >   
> > default
> > FuzzyLookupFactory
> > test.dict
> > suggest_field
> >   
> > 
> >
> >  startup="lazy">
> >   
> > true
> > 10
> >   
> >   
> > suggest
> >   
> > 
> >
> > The *query* I fire is:
> >
> > http://localhost:8983/solr/core1/suggest?q=desk&suggest.build=true
> >
> > is there anyway, I can get the above scenario working?
> >
> > Many thanks,
> > Niraj
> >
>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
>


Re: unordered autocomplete search

2017-09-04 Thread Mikhail Khludnev
The first question is, "sourceLocation">test.dict makes sense?
Then, for me, it looks like a case for AnalyzingInfixLookupFactory
https://lucidworks.com/2015/03/04/solr-suggester/ rather than

   - The FuzzyLookupFactory that creates suggestions for misspelled words
   in fields.




On Mon, Sep 4, 2017 at 11:57 AM, Niraj Aswani  wrote:

> Hi,
>
> I am using solr 5.5.4.
>
> I would like to perform an unordered autocomplete search however it seems
> that it only suggests phrases that start with my term in the query.
>
> For example, in my dictionary I have,
>
> *lamp desk*
>
> When searching for the term "lamp", it is able to show the the suggestion
> "lamp desk" as the suggestion is starting with the word "lamp". However,
> when I search for the term "desk", it doesn't show any suggestion.
>
> My field in the *managed-schema* is as below:
>
>  positionIncrementGap="100">
>   
> 
> 
>   
>   
> 
>   
> 
>
> My controller in *solconfig.xml* is defined as the following:
>
> 
> 
>   
> default
> FuzzyLookupFactory
> test.dict
> suggest_field
>   
> 
>
> 
>   
> true
> 10
>   
>   
> suggest
>   
> 
>
> The *query* I fire is:
>
> http://localhost:8983/solr/core1/suggest?q=desk&suggest.build=true
>
> is there anyway, I can get the above scenario working?
>
> Many thanks,
> Niraj
>



-- 
Sincerely yours
Mikhail Khludnev


unordered autocomplete search

2017-09-04 Thread Niraj Aswani
Hi,

I am using solr 5.5.4.

I would like to perform an unordered autocomplete search however it seems
that it only suggests phrases that start with my term in the query.

For example, in my dictionary I have,

*lamp desk*

When searching for the term "lamp", it is able to show the the suggestion
"lamp desk" as the suggestion is starting with the word "lamp". However,
when I search for the term "desk", it doesn't show any suggestion.

My field in the *managed-schema* is as below:


  


  
  

  


My controller in *solconfig.xml* is defined as the following:



  
default
FuzzyLookupFactory
test.dict
suggest_field
  



  
true
10
  
  
suggest
  


The *query* I fire is:

http://localhost:8983/solr/core1/suggest?q=desk&suggest.build=true

is there anyway, I can get the above scenario working?

Many thanks,
Niraj