CustomQueryParser

2008-12-15 Thread ayyanar

I found the following solution in the forum to use BoostingTermQuery in solr:

"I ended up subclassing QueryParser and overriding newTermQuery() to create
a BoostingTermQuery instead of a plain ol' TermQuery.  Seems to work. "

http://www.nabble.com/RE:-using-BoostingTermQuery-p19651792.html

I have some questions on this:

1) Anyone tried this? Is it working
2) Where to specify the query parser subclass name? SolrConfig.xml? What is
the xml tag name for this?
3) Should we use Qparser? I think we can directly subclass the QueryParser
and do that. Am I right?
4) Kindly post the code sample to override the newTermQuery() to create a
BoostingTermQuery 

Thanks in advance
Ayyanar


-- 
View this message in context: 
http://www.nabble.com/CustomQueryParser-tp21012136p21012136.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: using BoostingTermQuery

2008-12-15 Thread ayyanar

> I'm no QueryParser expert, but I would probably start w/ the default 
> query parser in Solr (LuceneQParser), and then progress a bit to the 
> DisMax one.  I'd ask specific questions based on what you see there. 
> If you get far enough along, you may consider asking for help on the 
> java-user list as well. 

>Thanks - I think I've got it working now.  I ended up subclassing
QueryParser and overriding >newTermQuery() to create a BoostingTermQuery
instead of a plain ol' TermQuery.  Seems to work. 

Kindly let me know where and how to configure the overridden query parser in
solr


-Ayyanar
-- 
View this message in context: 
http://www.nabble.com/using-BoostingTermQuery-tp19637123p21011626.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: scoring individual values in a multivalued field

2008-12-14 Thread ayyanar

Hi Sebastin,  did you find solution for your problem. Kindly post the code
examples. This will help me lot.
-- 
View this message in context: 
http://www.nabble.com/scoring-individual-values-in-a-multivalued-field-tp19212800p21008475.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: scoring individual values in a multivalued field

2008-12-14 Thread ayyanar

Hi Hossman, you suggested two solutions. Can you explain little bit more on
the second option? Iam not able to understand.  Kindly explain with an
example

At the moment, the simplest mechanisms for achieving something like what 
you are describing that i know of are: 
  1) repetitive values.  Add a value twice to make it counnt (roughly) 
 twice as much. (eliminating lengthNorm and customing your Similarity 
 is neccessary to make it worth exactly twice as much) 
  2) differnet fields.  Partition the spectrum of "importance" for your 
 values into N buckets, make a field for each bucket, put the value in 
 the bucket that makes the most sense, and at query time query ofr 
 each bucket with a differnet query time boost. 

-- 
View this message in context: 
http://www.nabble.com/scoring-individual-values-in-a-multivalued-field-tp19212800p21008401.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Nwebie Question on boosting

2008-12-11 Thread ayyanar


Thanks Rob. Can you plz provide some sample documents (lucene) for title
bassed boosting?
-- 
View this message in context: 
http://www.nabble.com/Nwebie-Question-on-boosting-tp20950286p20952532.html
Sent from the Solr - User mailing list archive at Nabble.com.



Nwebie Question on boosting

2008-12-10 Thread ayyanar

I read many articles on boosting still iam not so clear on boosting. Can
anyone explain the following questions with examples? 

1) Can you given an example for field level boosting and document level
boosting and the difference between two? 

2) If we set the boost at field level (index time), should the query
contains the that particular field? 
For example, if we set the boost for title field, should we create the
termquery for title field? 

Also, based on your experience, can you explain why you need the boosting. 

Thanks, 
Ayyanar. A
-- 
View this message in context: 
http://www.nabble.com/Nwebie-Question-on-boosting-tp20950286p20950286.html
Sent from the Solr - User mailing list archive at Nabble.com.



Newbie Question boosting

2008-12-10 Thread ayyanar

I read many articles on boosting still iam not so clear on boosting. Can
anyone explain the following questions with examples?

1) Can you given an example for field level boosting and document level
boosting and the difference between two?

2) If we set the boost at field level (index time), should the query
contains the that particular field?
For example, if we set the boost for title field, should we create the
termquery for title field?

Also, based on your experience, can you explain why you need the boosting.

Thanks,
Ayyanar. A
-- 
View this message in context: 
http://www.nabble.com/Newbie-Question-boosting-tp20950268p20950268.html
Sent from the Solr - User mailing list archive at Nabble.com.



Value based boosting - Design Help

2008-12-10 Thread ayyanar

We have a requirement for a keyword search in one of our projects and we are
using Solr/Lucene for the same.   

We have the data, link_id, title, url and a collection of keywords
associated to a link_id. Right now we have indexed link_id, title, url and
keywords (multivalued field) in a single index. 
 

Also, in our requirement each keyword value has a weight associated to it
and this weight is calculated based on certain factors like (if the keyword
exist in title then it takes a specific weight etc…). This weight should
drive the relevancy on the search result. For example, when a user enters a
keyword called “Biology” and clicks search, we search the keywords field in
the index. That document that contains the searched keyword with higher
weight should come first.

 

Eg:

 

Document 1:

LinkID = 100

Title = Biology

Keywords = Biology, BioNews, Bio, Bio chemistry

 

Document 2:

LinkID = 102

Title = Nutrition

Keywords = Biology, Nutrition, Dietics 

 

In the above example document 1 should come first because we will associate
more weight to the keyword biology for link id 100 in document 1

 

We understand that this weight can be applied as a boost to a field. The
problem is that in Solr/Lucene we cannot associate a different boost to
different values of a same field. 

 

It would be vey helpful for us if you can provide your thoughts/inputs on
how to achieve this requirement in Lucene:

 

Do we have a way to associate a different boost to different values of a
same field? 
Can we maintain the list of keywords associated to each link_id in a
separate index, so that we can associate weight to each keyword value? If
so, how do we relate the main index and the keyword index? 
 


-- 
View this message in context: 
http://www.nabble.com/Value-based--boosting---Design-Help-tp20934304p20934304.html
Sent from the Solr - User mailing list archive at Nabble.com.