Re: query against two fields

2016-03-14 Thread Erick Erickson
Ah, that's _Lucene_, support for Solr wasn't added until Solr
4.8.. sorry about that.


On Mon, Mar 14, 2016 at 9:06 AM, Vis Sw <vishal@gmail.com> wrote:
> Thanks Erick...
>
> Strange... I am getting Unknown query parser 'complexphrase'...
>
> SOLR ver is 4.7.0 and I can see
> org.apache.lucene.queryparser.complexPhrase.ComplexPhraseQueryParser in
> lucene-queryparser-4.7.0.jar
>
> http://localhost:8081/solr/collection1/select?q={!complexphrase
> inOrder=true}manu:"a* c*"
> http://localhost:8081/solr/collection1/select?q=manu:%22a*%20c*%22=complexphrase=manu
>
> On Sat, Mar 12, 2016 at 6:35 PM, Erick Erickson <erickerick...@gmail.com>
> wrote:
>
>> In a word, ComplexPhraseQueryParser. See:
>>
>> https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-ComplexPhraseQueryParser
>>
>> so you search for "John de*" or "john d*" etc.
>>
>>
>> Best,
>> Erick
>>
>> On Sat, Mar 12, 2016 at 6:40 AM, Vis Sw <vishal@gmail.com> wrote:
>> > Thanks a lot Erick...
>> >
>> > a) Yes it does return result...
>> >
>> http://localhost:8081/solr/testCollection/select?q=(project:A%20OR%20collaborator:%22John%20Dave%22)=json
>> >
>> > Please suggest the best approach for the search to be like...
>> > for e.g. if collaborator "John Davis", "John Denver"...
>> > John D : should return both results, John De : should return John Denver
>> >
>> > b) I followed the example in collection1 and indexed it as below...
>> >
>> > > > multiValued="true"/>
>> > > >  stored="true"  multiValued="false" />
>> > > >  stored="true"  multiValued="false" />
>> > 
>> > 
>> >
>> > > > positionIncrementGap="100">
>> >   
>> > 
>> > > > words="stopwords.txt" />
>> > 
>> >   
>> >   
>> > 
>> > > > words="stopwords.txt" />
>> > > > ignoreCase="true" expand="true"/>
>> > 
>> >   
>> > 
>> >
>> > On Fri, Mar 11, 2016 at 4:10 PM, Erick Erickson <erickerick...@gmail.com
>> >
>> > wrote:
>> >
>> >> I'm assuming that by "Angular UI" you're talking the Solr admin UI
>> >> (which, BTW, is not recommended for any user-facing UI).
>> >>
>> >> > query against two fields;
>> >> Isn't this just putting
>> >>
>> >> project:whatever OR collaborator:whatever
>> >>
>> >> in the "q" box?
>> >>
>> >> >  return all fields which we want to display
>> >> Just put them in the "fl" box.
>> >>
>> >> Best,
>> >> Erick
>> >>
>> >> On Fri, Mar 11, 2016 at 10:46 AM, Vis Sw <vishal@gmail.com> wrote:
>> >> > Hi,
>> >> >
>> >> > I need to query against two fields (e.g. search term present in either
>> >> > fields project or collaborator) but return all fields which we want to
>> >> > display using Angular UI.
>> >> >
>> >> > Should I combine project and collaborator to some field then query or
>> >> there
>> >> > is any better way around
>> >> >
>> >> > Thanks for your suggestion...
>> >> >
>> >> > Regards
>> >> > Val
>> >>
>>


Re: query against two fields

2016-03-14 Thread Vis Sw
Thanks Erick...

Strange... I am getting Unknown query parser 'complexphrase'...

SOLR ver is 4.7.0 and I can see
org.apache.lucene.queryparser.complexPhrase.ComplexPhraseQueryParser in
lucene-queryparser-4.7.0.jar

http://localhost:8081/solr/collection1/select?q={!complexphrase
inOrder=true}manu:"a* c*"
http://localhost:8081/solr/collection1/select?q=manu:%22a*%20c*%22=complexphrase=manu

On Sat, Mar 12, 2016 at 6:35 PM, Erick Erickson <erickerick...@gmail.com>
wrote:

> In a word, ComplexPhraseQueryParser. See:
>
> https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-ComplexPhraseQueryParser
>
> so you search for "John de*" or "john d*" etc.
>
>
> Best,
> Erick
>
> On Sat, Mar 12, 2016 at 6:40 AM, Vis Sw <vishal@gmail.com> wrote:
> > Thanks a lot Erick...
> >
> > a) Yes it does return result...
> >
> http://localhost:8081/solr/testCollection/select?q=(project:A%20OR%20collaborator:%22John%20Dave%22)=json
> >
> > Please suggest the best approach for the search to be like...
> > for e.g. if collaborator "John Davis", "John Denver"...
> > John D : should return both results, John De : should return John Denver
> >
> > b) I followed the example in collection1 and indexed it as below...
> >
> >  > multiValued="true"/>
> >  >  stored="true"  multiValued="false" />
> >  >  stored="true"  multiValued="false" />
> > 
> > 
> >
> >  > positionIncrementGap="100">
> >   
> > 
> >  > words="stopwords.txt" />
> > 
> >   
> >   
> > 
> >  > words="stopwords.txt" />
> >  > ignoreCase="true" expand="true"/>
> > 
> >   
> > 
> >
> > On Fri, Mar 11, 2016 at 4:10 PM, Erick Erickson <erickerick...@gmail.com
> >
> > wrote:
> >
> >> I'm assuming that by "Angular UI" you're talking the Solr admin UI
> >> (which, BTW, is not recommended for any user-facing UI).
> >>
> >> > query against two fields;
> >> Isn't this just putting
> >>
> >> project:whatever OR collaborator:whatever
> >>
> >> in the "q" box?
> >>
> >> >  return all fields which we want to display
> >> Just put them in the "fl" box.
> >>
> >> Best,
> >> Erick
> >>
> >> On Fri, Mar 11, 2016 at 10:46 AM, Vis Sw <vishal@gmail.com> wrote:
> >> > Hi,
> >> >
> >> > I need to query against two fields (e.g. search term present in either
> >> > fields project or collaborator) but return all fields which we want to
> >> > display using Angular UI.
> >> >
> >> > Should I combine project and collaborator to some field then query or
> >> there
> >> > is any better way around
> >> >
> >> > Thanks for your suggestion...
> >> >
> >> > Regards
> >> > Val
> >>
>


Re: query against two fields

2016-03-12 Thread Erick Erickson
In a word, ComplexPhraseQueryParser. See:
https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-ComplexPhraseQueryParser

so you search for "John de*" or "john d*" etc.


Best,
Erick

On Sat, Mar 12, 2016 at 6:40 AM, Vis Sw <vishal@gmail.com> wrote:
> Thanks a lot Erick...
>
> a) Yes it does return result...
> http://localhost:8081/solr/testCollection/select?q=(project:A%20OR%20collaborator:%22John%20Dave%22)=json
>
> Please suggest the best approach for the search to be like...
> for e.g. if collaborator "John Davis", "John Denver"...
> John D : should return both results, John De : should return John Denver
>
> b) I followed the example in collection1 and indexed it as below...
>
>  multiValued="true"/>
>   stored="true"  multiValued="false" />
>   stored="true"  multiValued="false" />
> 
> 
>
>  positionIncrementGap="100">
>   
> 
>  words="stopwords.txt" />
> 
>   
>   
> 
>  words="stopwords.txt" />
>  ignoreCase="true" expand="true"/>
> 
>   
> 
>
> On Fri, Mar 11, 2016 at 4:10 PM, Erick Erickson <erickerick...@gmail.com>
> wrote:
>
>> I'm assuming that by "Angular UI" you're talking the Solr admin UI
>> (which, BTW, is not recommended for any user-facing UI).
>>
>> > query against two fields;
>> Isn't this just putting
>>
>> project:whatever OR collaborator:whatever
>>
>> in the "q" box?
>>
>> >  return all fields which we want to display
>> Just put them in the "fl" box.
>>
>> Best,
>> Erick
>>
>> On Fri, Mar 11, 2016 at 10:46 AM, Vis Sw <vishal@gmail.com> wrote:
>> > Hi,
>> >
>> > I need to query against two fields (e.g. search term present in either
>> > fields project or collaborator) but return all fields which we want to
>> > display using Angular UI.
>> >
>> > Should I combine project and collaborator to some field then query or
>> there
>> > is any better way around
>> >
>> > Thanks for your suggestion...
>> >
>> > Regards
>> > Val
>>


Re: query against two fields

2016-03-12 Thread Vis Sw
Thanks a lot Erick...

a) Yes it does return result...
http://localhost:8081/solr/testCollection/select?q=(project:A%20OR%20collaborator:%22John%20Dave%22)=json

Please suggest the best approach for the search to be like...
for e.g. if collaborator "John Davis", "John Denver"...
John D : should return both results, John De : should return John Denver

b) I followed the example in collection1 and indexed it as below...








  



  
  




  


On Fri, Mar 11, 2016 at 4:10 PM, Erick Erickson <erickerick...@gmail.com>
wrote:

> I'm assuming that by "Angular UI" you're talking the Solr admin UI
> (which, BTW, is not recommended for any user-facing UI).
>
> > query against two fields;
> Isn't this just putting
>
> project:whatever OR collaborator:whatever
>
> in the "q" box?
>
> >  return all fields which we want to display
> Just put them in the "fl" box.
>
> Best,
> Erick
>
> On Fri, Mar 11, 2016 at 10:46 AM, Vis Sw <vishal@gmail.com> wrote:
> > Hi,
> >
> > I need to query against two fields (e.g. search term present in either
> > fields project or collaborator) but return all fields which we want to
> > display using Angular UI.
> >
> > Should I combine project and collaborator to some field then query or
> there
> > is any better way around
> >
> > Thanks for your suggestion...
> >
> > Regards
> > Val
>


Re: query against two fields

2016-03-11 Thread Erick Erickson
I'm assuming that by "Angular UI" you're talking the Solr admin UI
(which, BTW, is not recommended for any user-facing UI).

> query against two fields;
Isn't this just putting

project:whatever OR collaborator:whatever

in the "q" box?

>  return all fields which we want to display
Just put them in the "fl" box.

Best,
Erick

On Fri, Mar 11, 2016 at 10:46 AM, Vis Sw <vishal@gmail.com> wrote:
> Hi,
>
> I need to query against two fields (e.g. search term present in either
> fields project or collaborator) but return all fields which we want to
> display using Angular UI.
>
> Should I combine project and collaborator to some field then query or there
> is any better way around
>
> Thanks for your suggestion...
>
> Regards
> Val


query against two fields

2016-03-11 Thread Vis Sw
Hi,

I need to query against two fields (e.g. search term present in either
fields project or collaborator) but return all fields which we want to
display using Angular UI.

Should I combine project and collaborator to some field then query or there
is any better way around

Thanks for your suggestion...

Regards
Val