Reputation: 2976
I am using hibernate search with solr in my project and one of my use case would require data to be tokenized and indexed as follows:
One of my database field is a varchar and has values : New Road, Kings way (separated with commas)
I want the New Road and kings way to be used as a token rather than New, road, kings and way so that when i search for blah blah blah new road blah blah, it will show result with new road and if the search text contains new book, the result with new road won't show up.
Thanks in advance
Upvotes: 1
Views: 762
Reputation: 53597
You can tokenize and search on that field using the solr.PatternTokenizerFactory
http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
Upvotes: 2