Hi,
 
I am able to see the results when i pass the values in the query browser.
 
When i pass the below query i am able to see the difference in output.
 
http://localhost:8983/solr/select/?q=java^100%20technology^1
 
Each time user cannot pass the values in the query browser to see the output.
 
But where exactly 
 
java^100 technology^1
 
this value should be set.In which file and which location to be precise?.
 
Please help me.
 
Regards
Bhaskar
 

--- On Wed, 10/14/09, AHMET ARSLAN <iori...@yahoo.com> wrote:


From: AHMET ARSLAN <iori...@yahoo.com>
Subject: Re: Boosting of words
To: solr-user@lucene.apache.org
Date: Wednesday, October 14, 2009, 6:41 AM



> Hi Clark,
>  
> Thanks for your input. I have a query.
>  
>  
> I have my XML which contains the following:
>  
> <add>
> <doc>
>   <field name="url">http://www.sun.com</field>
>   <field name="title">information</field>
>   <field name="description">java plays a important
> role in computer industry for web users</field>
> </doc>
> <doc>
>   <field name="url">http://www.askguru.com</field>
>   <field name="title">homepage</field>
>   <field name="description">Information about
> technology is stored in the web sites</field>
> </doc>
> <doc>
>   <field name="url">http://www.techie.com</field>
>   <field name="title">post queries</field>
>   <field name="description">This web site have more
> java technology related to web</field>
> </doc>
> </add>
>  
> When I give “java technology” as my input in Solr admin
> page ,At present  I get output as 
>  
> <doc>
>   <field name="url">http://www.techie.com</field>
>   <field name="title">post queries</field>
>   <field name="description">This web site have more
> java technology related to web</field>
> </doc>
>  
> Now I need to get doc which has “technology” also
>  
> When I give “java technology “
>  
> I need to get output as,I need to give boosting to doc
> which has “technology”. It should display in the below
> order.The output should come as 
>  
> <doc>
>   <field name="url">http://www.techie.com</field>
>   <field name="title">post queries</field>
>   <field name="description">This web site have more
> java technology related to web</field>
> </doc>
> <doc>
>   <field name="url">http://www.askguru.com</field>
>   <field name="title">homepage</field>
>   <field name="description">Information about
> technology is stored in the web sites</field>
> </doc>
> <doc>
>   <field name="url">http://www.sun.com</field>
>   <field name="title">information</field>
>   <field name="description">java plays a important
> role in computer industry for web users</field>
> </doc>
>  
> Let me know how to achieve the same?

The query :  java^1 OR technology^100   will do it. Results will be in this 
order:

1-)This web site have more java technology related to web
2-)Information about technology is stored in the web sites
3-)java plays a important role in computer industry for web users

1-) contains both java and technology
2-) contains only technology
3-) contains only java

Is that what you want? 

Note that there is no "" quotes in the query above. And you can adjust boost 
factors (1 and 100) according to your needs. Use OR operator between terms. You 
set individual terms boost with ^ operator.

hope this helps.








      

Reply via email to