-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Using Synonyms as well as NGram search - Exact Search
PostPosted: Tue May 17, 2011 1:55 am 
Regular
Regular

Joined: Tue May 17, 2011 1:45 am
Posts: 52
Hi,

This might have been answered elsewhere but I could not figure it out yet. I have a requirement to use synonyms as there are many short hand abbreviations the documents I index uses , example : PMR =>Project Management , etc. Additionally I also have a requirement in which I should be able to search with containing words, example searching for Manage should also return Management.

I am using Hibernate Search 3.1 with Solr 1.4.1 core ( This is my prod environment , so cant change it), would be very helpful if you could help in the following

1. For the above requirement above how do I do an Exact Phrase search? Example "Project Management" vs field1 :"Project" field 1:"Management"
2. Use synonyms with NGram


Top
 Profile  
 
 Post subject: Re: Using Synonyms as well as NGram search - Exact Search
PostPosted: Tue May 17, 2011 6:29 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Quote:
1. For the above requirement above how do I do an Exact Phrase search? Example "Project Management" vs field1 :"Project" field 1:"Management"

using a PhraseQuery? you can score matches higher when the order of terms is similar to the order defined in your query, and check the other options such as sloppyness.

Quote:
2. Use synonyms with NGram

You can use synonyms, or NGrams, or combine them. It seems you want to combine them, but the effect might not be what you expect; I'd suggest insted to try indexing the same field twice using two different analysers, so to write two different fields (example: description_synonyms, description_ngrams ). Use the @Fields annotation to list multiple fields.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.