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 DHast <ha...@gmail.com> on 2009/09/15 16:56:48 UTC
do NOT want to stem plurals for a particular field, or words
I have a field where there are items that are plurals, and used as very
specific locators, so i do a solr search type:articles, and it translates it
into : type:article, then into type:articl... is tehre a way to stop it from
doing this on either the field "type" or on a list of words "articles,
notes, etc"
i tried enering into the protwords.txt file and dont seem to get any where
--
View this message in context: http://www.nabble.com/do-NOT-want-to-stem-plurals-for-a-particular-field%2C-or-words-tp25455570p25455570.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: faceted query not working as i expected
Posted by Jonathan Vanasco <jv...@2xlp.com>.
Thank you Ahmet.
I forgot to encapuslate the searched string in quotations.
On Sep 15, 2009, at 5:19 PM, AHMET ARSLAN wrote:
>
>
> --- On Tue, 9/15/09, Jonathan Vanasco <jv...@2xlp.com> wrote:
>
>> From: Jonathan Vanasco <jv...@2xlp.com>
>> Subject: faceted query not working as i expected
>> To: solr-user@lucene.apache.org
>> Date: Tuesday, September 15, 2009, 10:54 PM
>> I'm trying to request documents that
>> have "facet.venue_type" as "Private Collection"
>>
>> Instead I'm also getting items where another field is
>> marked "Permanent Collection"
>>
>> My schema has:
>>
>> <fields>
>> <field name="venue_type" type="text"
>> indexed="true" stored="true" required="false" />
>> <field name="facet.venue_type"
>> type="string" indexed="true" stored="true" required="false"
>> />
>> </fields>
>> <copyField source="venue_type" dest="facet.venue_type"
>> />
>>
>>
>> My query is
>>
>> q=*:*
>> qt=standard
>> facet=true
>> facet.missing=true
>> facet.field=facet.venue_type
>> fq=venue_type:Private+Collection
>>
>> Can anyone offer a suggestion as to what I'm doing wrong ?
>>
>
> The filter query fq=venue_type:Private+Collection has a part that
> runs on default field. It is parsed to venue_type:Private
> defaultField:Collection You can use
> fq=venue_type:"Private+Collection"
> or
> fq=venue_type:(Private AND Collection)
> instead.
>
> These will/may bring documents having "something Private Collection"
> in venue_type field since it is a tokenized field.
>
> If you want to retrieve documents that have "facet.venue_type" as
> "Private Collection" you can use fq:facet.venue_type:"Private
> Collection" that operates on a string (non-tokenized) field.
>
> Hope this helps.
>
>
>
Re: faceted query not working as i expected
Posted by AHMET ARSLAN <io...@yahoo.com>.
--- On Tue, 9/15/09, Jonathan Vanasco <jv...@2xlp.com> wrote:
> From: Jonathan Vanasco <jv...@2xlp.com>
> Subject: faceted query not working as i expected
> To: solr-user@lucene.apache.org
> Date: Tuesday, September 15, 2009, 10:54 PM
> I'm trying to request documents that
> have "facet.venue_type" as "Private Collection"
>
> Instead I'm also getting items where another field is
> marked "Permanent Collection"
>
> My schema has:
>
> <fields>
> <field name="venue_type" type="text"
> indexed="true" stored="true" required="false" />
> <field name="facet.venue_type"
> type="string" indexed="true" stored="true" required="false"
> />
> </fields>
> <copyField source="venue_type" dest="facet.venue_type"
> />
>
>
> My query is
>
> q=*:*
> qt=standard
> facet=true
> facet.missing=true
> facet.field=facet.venue_type
> fq=venue_type:Private+Collection
>
> Can anyone offer a suggestion as to what I'm doing wrong ?
>
The filter query fq=venue_type:Private+Collection has a part that runs on default field. It is parsed to venue_type:Private defaultField:Collection You can use
fq=venue_type:"Private+Collection"
or
fq=venue_type:(Private AND Collection)
instead.
These will/may bring documents having "something Private Collection" in venue_type field since it is a tokenized field.
If you want to retrieve documents that have "facet.venue_type" as "Private Collection" you can use fq:facet.venue_type:"Private Collection" that operates on a string (non-tokenized) field.
Hope this helps.
faceted query not working as i expected
Posted by Jonathan Vanasco <jv...@2xlp.com>.
I'm trying to request documents that have "facet.venue_type" as
"Private Collection"
Instead I'm also getting items where another field is marked
"Permanent Collection"
My schema has:
<fields>
<field name="venue_type" type="text" indexed="true" stored="true"
required="false" />
<field name="facet.venue_type" type="string" indexed="true"
stored="true" required="false" />
</fields>
<copyField source="venue_type" dest="facet.venue_type" />
My query is
q=*:*
qt=standard
facet=true
facet.missing=true
facet.field=facet.venue_type
fq=venue_type:Private+Collection
Can anyone offer a suggestion as to what I'm doing wrong ?
Re: do NOT want to stem plurals for a particular field, or words
Posted by Alexey Serba <as...@gmail.com>.
> You can enable/disable stemming per field type in the schema.xml, by
> removing the stemming filters from the type definition.
>
> Basically, copy your prefered type, rename it to something like
> 'text_nostem', remove the stemming filter from the type and use your
> 'text_nostem' type for your field 'type' .
+ you can search in both fields text_stemmed and text_exact using
DisMax handler and boost text_exact matching. Thus if you search for
'articles' you'll get all results with 'articles' and 'article', but
exact match will be on top.
Re: do NOT want to stem plurals for a particular field, or words
Posted by Jérôme Etévé <je...@gmail.com>.
Hi,
You can enable/disable stemming per field type in the schema.xml, by
removing the stemming filters from the type definition.
Basically, copy your prefered type, rename it to something like
'text_nostem', remove the stemming filter from the type and use your
'text_nostem' type for your field 'type' .
By what you say, I guess your field 'type' will be even more happier
to simply be of type 'string' .
Jerome.
2009/9/15 DHast <ha...@gmail.com>:
>
> I have a field where there are items that are plurals, and used as very
> specific locators, so i do a solr search type:articles, and it translates it
> into : type:article, then into type:articl... is tehre a way to stop it from
> doing this on either the field "type" or on a list of words "articles,
> notes, etc"
>
> i tried enering into the protwords.txt file and dont seem to get any where
> --
> View this message in context: http://www.nabble.com/do-NOT-want-to-stem-plurals-for-a-particular-field%2C-or-words-tp25455570p25455570.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>
--
Jerome Eteve.
http://www.eteve.net
jerome@eteve.net