You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@lucene.apache.org by markemark <ma...@yahoo.com> on 2011/04/01 16:33:52 UTC
Help Lucene Indexing category Path with '/' characters
Dear Lucene Users,
Help Please :-)
I am indexing a document which has a number of category paths
e.g.
/Top/My Prods/Book Prods/Text Books, /Maths/Books/TextBooks
i.e. category paths delimited by ,
I want to store this field, so the Analyser tokenizes the document only on
',' charaters and not on the '/' characters
How can I do this ?
Many thanks
Mark
--
View this message in context: http://lucene.472066.n3.nabble.com/Help-Lucene-Indexing-category-Path-with-characters-tp2763520p2763520.html
Sent from the Lucene - General mailing list archive at Nabble.com.
RE: Help Lucene Indexing category Path with '/' characters
Posted by "Smiley, David W." <ds...@mitre.org>.
Hi Mark.
Technical questions about using Lucene go to the java user list:
http://lucene.apache.org/java/docs/mailinglists.html#Java%20User%20List
To answer you're question; I think what you actually want to do is simply split the ',' delimited value yourself, then hand each in to Lucene as a separate value. I'm suggesting this because what you have there are distinct *values*, and Analyzers work on a single value at a time, they don't make multiple values from one value. It's semantics. That said if you insist on the analyzer doing this then you could manage but I don't think it's what you actually want.
~ David Smiley
________________________________________
From: markemark [markjwiltshire@yahoo.com]
Sent: Friday, April 01, 2011 10:33 AM
To: general@lucene.apache.org
Subject: Help Lucene Indexing category Path with '/' characters
Dear Lucene Users,
Help Please :-)
I am indexing a document which has a number of category paths
e.g.
/Top/My Prods/Book Prods/Text Books, /Maths/Books/TextBooks
i.e. category paths delimited by ,
I want to store this field, so the Analyser tokenizes the document only on
',' charaters and not on the '/' characters
How can I do this ?
Many thanks
Mark
--
View this message in context: http://lucene.472066.n3.nabble.com/Help-Lucene-Indexing-category-Path-with-characters-tp2763520p2763520.html
Sent from the Lucene - General mailing list archive at Nabble.com.