Use delimiter option instead of pattern for PathHierarchyTokenizerFactory:

http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.PathHierarchyTokenizerFactory

koji
--
http://soleami.com/blog/starting-lab-work.html

(12/09/12 22:22), mechravi25 wrote:
Hi,

Im Using Solr 3.6.1 version and I have a field which is having values like

A|B|C
B|C|D|EE
A|C|B
A|B|D
..etc..

So, When I search for "A|B", I should get documents starting with
"A" and "A|B"

To implement this, I've used PathHierarchyTokenizer for the above field as


<fieldType name="filep" class="solr.TextField" positionIncrementGap="100">
  <analyzer type="index">
<tokenizer class="solr.PathHierarchyTokenizerFactory" pattern="|"/>
  </analyzer>
<analyzer type="query">
     <tokenizer class="solr.KeywordTokenizerFactory" />
</analyzer>
</fieldType>

But, When I use the solr analysis page to check if its being split on the
pipe symbol ("|") on indexing, I see that its being taken as the entire
token and its not getting split on the delimiter (i.e. the searching is done
only for "A|B" in the above case)

I also tried using "\|" as the delimiter but also its not working.

Am I missing anything here? Or Will the Path Hierarchy not accept pipe
symbol ("|") as delimiter?
Can anyone guide me on this?

Thanks a lot



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Doubts-in-PathHierarchyTokenizer-tp4007216.html
Sent from the Solr - User mailing list archive at Nabble.com.




Reply via email to