You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by con <co...@gmail.com> on 2009/01/14 07:23:06 UTC
Searchable and Non Searchable Fields
Hi All
I am using dataimporthandler to index values from oracle db.
My sample rows are like:
1) FirstName-> George, LastName-> Bush, Country-> US
2) FirstName-> Georgeon, LastName-> Washington, Country-> US
3) FirstName-> Tony, LastName-> George, Country-> UK
4) FirstName-> Gordon, LastName-> Brown, Country-> UK
5) FirstName-> Vladimer, LastName-> Putin, Country-> Russia
How can i set only the FirstName field as searchable.
For eg. if I search George, I should get FirstName, LastName and Country of
first and second rows only, and if I search Bush no value should be
returned.
I tried by providing various options for the <field> at schema.xml
<field name="FirstName" type="string" indexed="true" stored="true" />
<field name="LastName" type="string" indexed="true" stored="true" />
<field name="Country" type="string" indexed="true" stored="true" />
But it is not providing the exact results.
How can I change the field attributes to get this result? Or is there
someother configs for this?
Expecting reply
Thanks in advance
con
--
View this message in context: http://www.nabble.com/Searchable-and-Non-Searchable-Fields-tp21450664p21450664.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Searchable and Non Searchable Fields
Posted by Otis Gospodnetic <ot...@yahoo.com>.
Con,
Sure. You just have to specify the field name when searching:
FirstName:George (and not just: George)
Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
----- Original Message ----
> From: con <co...@gmail.com>
> To: solr-user@lucene.apache.org
> Sent: Thursday, January 15, 2009 12:20:55 AM
> Subject: Re: Searchable and Non Searchable Fields
>
>
> Thanks for the reply Otis
> Even if we dont get both George and Georgeon, Can we have only the firstname
> as searchable.
> That is, If I search George, I should get firstname, lastname, and country
> of the first row, and no values from the third row should be returned
>
> Regards
> Con
>
>
>
> Otis Gospodnetic wrote:
> >
> > Hi,
> >
> > Your schema setup looks fine.
> > George is no the same as Georgeon, so 2) won't match a search for
> > FirstName:George
> >
> > Otis
> > --
> > Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
> >
> >
> >
> > ----- Original Message ----
> >> From: con
> >> To: solr-user@lucene.apache.org
> >> Sent: Wednesday, January 14, 2009 1:23:06 AM
> >> Subject: Searchable and Non Searchable Fields
> >>
> >>
> >> Hi All
> >>
> >> I am using dataimporthandler to index values from oracle db.
> >>
> >> My sample rows are like:
> >>
> >> 1) FirstName-> George, LastName-> Bush, Country-> US
> >> 2) FirstName-> Georgeon, LastName-> Washington, Country-> US
> >> 3) FirstName-> Tony, LastName-> George, Country-> UK
> >> 4) FirstName-> Gordon, LastName-> Brown, Country-> UK
> >> 5) FirstName-> Vladimer, LastName-> Putin, Country-> Russia
> >>
> >> How can i set only the FirstName field as searchable.
> >> For eg. if I search George, I should get FirstName, LastName and Country
> >> of
> >> first and second rows only, and if I search Bush no value should be
> >> returned.
> >>
> >> I tried by providing various options for the at schema.xml
> >>
> >>
> >>
> >>
> >> But it is not providing the exact results.
> >>
> >> How can I change the field attributes to get this result? Or is there
> >> someother configs for this?
> >>
> >> Expecting reply
> >> Thanks in advance
> >> con
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Searchable-and-Non-Searchable-Fields-tp21450664p21450664.html
> >> Sent from the Solr - User mailing list archive at Nabble.com.
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Searchable-and-Non-Searchable-Fields-tp21450664p21471595.html
> Sent from the Solr - User mailing list archive at Nabble.com.
Re: Searchable and Non Searchable Fields
Posted by con <co...@gmail.com>.
Thanks for the reply Otis
Even if we dont get both George and Georgeon, Can we have only the firstname
as searchable.
That is, If I search George, I should get firstname, lastname, and country
of the first row, and no values from the third row should be returned
Regards
Con
Otis Gospodnetic wrote:
>
> Hi,
>
> Your schema setup looks fine.
> George is no the same as Georgeon, so 2) won't match a search for
> FirstName:George
>
> Otis
> --
> Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
>
>
>
> ----- Original Message ----
>> From: con <co...@gmail.com>
>> To: solr-user@lucene.apache.org
>> Sent: Wednesday, January 14, 2009 1:23:06 AM
>> Subject: Searchable and Non Searchable Fields
>>
>>
>> Hi All
>>
>> I am using dataimporthandler to index values from oracle db.
>>
>> My sample rows are like:
>>
>> 1) FirstName-> George, LastName-> Bush, Country-> US
>> 2) FirstName-> Georgeon, LastName-> Washington, Country-> US
>> 3) FirstName-> Tony, LastName-> George, Country-> UK
>> 4) FirstName-> Gordon, LastName-> Brown, Country-> UK
>> 5) FirstName-> Vladimer, LastName-> Putin, Country-> Russia
>>
>> How can i set only the FirstName field as searchable.
>> For eg. if I search George, I should get FirstName, LastName and Country
>> of
>> first and second rows only, and if I search Bush no value should be
>> returned.
>>
>> I tried by providing various options for the at schema.xml
>>
>>
>>
>>
>> But it is not providing the exact results.
>>
>> How can I change the field attributes to get this result? Or is there
>> someother configs for this?
>>
>> Expecting reply
>> Thanks in advance
>> con
>> --
>> View this message in context:
>> http://www.nabble.com/Searchable-and-Non-Searchable-Fields-tp21450664p21450664.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>
>
>
--
View this message in context: http://www.nabble.com/Searchable-and-Non-Searchable-Fields-tp21450664p21471595.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Searchable and Non Searchable Fields
Posted by Otis Gospodnetic <ot...@yahoo.com>.
Hi,
Your schema setup looks fine.
George is no the same as Georgeon, so 2) won't match a search for FirstName:George
Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
----- Original Message ----
> From: con <co...@gmail.com>
> To: solr-user@lucene.apache.org
> Sent: Wednesday, January 14, 2009 1:23:06 AM
> Subject: Searchable and Non Searchable Fields
>
>
> Hi All
>
> I am using dataimporthandler to index values from oracle db.
>
> My sample rows are like:
>
> 1) FirstName-> George, LastName-> Bush, Country-> US
> 2) FirstName-> Georgeon, LastName-> Washington, Country-> US
> 3) FirstName-> Tony, LastName-> George, Country-> UK
> 4) FirstName-> Gordon, LastName-> Brown, Country-> UK
> 5) FirstName-> Vladimer, LastName-> Putin, Country-> Russia
>
> How can i set only the FirstName field as searchable.
> For eg. if I search George, I should get FirstName, LastName and Country of
> first and second rows only, and if I search Bush no value should be
> returned.
>
> I tried by providing various options for the at schema.xml
>
>
>
>
> But it is not providing the exact results.
>
> How can I change the field attributes to get this result? Or is there
> someother configs for this?
>
> Expecting reply
> Thanks in advance
> con
> --
> View this message in context:
> http://www.nabble.com/Searchable-and-Non-Searchable-Fields-tp21450664p21450664.html
> Sent from the Solr - User mailing list archive at Nabble.com.