You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by nostromo <do...@hotmail.com> on 2009/08/17 16:07:59 UTC
Indexing "Categorical fields" - newbie
Hi all,
Hoping your guys can help as I am real new to this :-(
I am trying to import documents using the csv handler. The process itself
works well but I get odd results when I try to search my index.
The problem is with a field which contains keywords, BUT the keywords could
contain spaces. An example is say I have a document describing a laptop,
its categorization might need to be :
Office Equipment
Hardware
Laptop
I have thus far been unable to search for category:Office Equipment
category is the name of the field in the schema. Searching for Hardware or
Laptop with the same query syntax will return the document.
I am guessing it is the way I define the index and query analyzers, but
could someone please give me some pointers on which I should use in this
case ?
Many Thanks,
D
--
View this message in context: http://www.nabble.com/Indexing-%22Categorical-fields%22---newbie-tp25007361p25007361.html
Sent from the Solr - Dev mailing list archive at Nabble.com.
Re: Indexing "Categorical fields" - newbie
Posted by nostromo <do...@hotmail.com>.
OK, feel stupid now.
Query should have been category:"Office Equipment", which worked !!
Thanks,
D
nostromo wrote:
>
> Hi all,
>
> Hoping your guys can help as I am real new to this :-(
>
> I am trying to import documents using the csv handler. The process itself
> works well but I get odd results when I try to search my index.
>
> The problem is with a field which contains keywords, BUT the keywords
> could contain spaces. An example is say I have a document describing a
> laptop, its categorization might need to be :
> Office Equipment
> Hardware
> Laptop
>
> I have thus far been unable to search for category:Office Equipment
>
> category is the name of the field in the schema. Searching for Hardware
> or Laptop with the same query syntax will return the document.
>
> I am guessing it is the way I define the index and query analyzers, but
> could someone please give me some pointers on which I should use in this
> case ?
>
> Many Thanks,
> D
>
--
View this message in context: http://www.nabble.com/Indexing-%22Categorical-fields%22---newbie-tp25007361p25007600.html
Sent from the Solr - Dev mailing list archive at Nabble.com.
Re: Indexing "Categorical fields" - newbie
Posted by nostromo <do...@hotmail.com>.
Sorry, meant to add that the category field will also be one of my faceting
fields which is why the full phrase is important
nostromo wrote:
>
> Hi all,
>
> Hoping your guys can help as I am real new to this :-(
>
> I am trying to import documents using the csv handler. The process itself
> works well but I get odd results when I try to search my index.
>
> The problem is with a field which contains keywords, BUT the keywords
> could contain spaces. An example is say I have a document describing a
> laptop, its categorization might need to be :
> Office Equipment
> Hardware
> Laptop
>
> I have thus far been unable to search for category:Office Equipment
>
> category is the name of the field in the schema. Searching for Hardware
> or Laptop with the same query syntax will return the document.
>
> I am guessing it is the way I define the index and query analyzers, but
> could someone please give me some pointers on which I should use in this
> case ?
>
> Many Thanks,
> D
>
--
View this message in context: http://www.nabble.com/Indexing-%22Categorical-fields%22---newbie-tp25007361p25007456.html
Sent from the Solr - Dev mailing list archive at Nabble.com.