And what did you use for entity detection?

GATE,openNLP?

Do you mind sharing that please?

 

From: Tommy Chheng-2 [via Lucene]
[mailto:ml-node+939600-682384129-124...@n3.nabble.com] 
Sent: Friday, July 02, 2010 3:20 PM
To: caman
Subject: Re: Query modification

 

  Hi, 
I actually did something similar on http://researchwatch.net/
if you search for "stanford university solar", it will process the query 
by tagging the stanford university to the organization field. 

I created a querycomponent class and altered the query string like 
this(in scala but translatable to java easily): 
   override def prepare(rb: ResponseBuilder){ 
     val params: SolrParams = rb.req.getParams 

     if(params.getBool(COMPONENT_NAME, false)){ 
       val queryString = params.get("q").trim //rb.getQueryString() 
       val entityTransform = new ClearboxEntityDetection 
       val (transformedQuery, explainMap) = 
entityTransform.transformQuery(queryString) 

       rb.setQueryString(transformedQuery) 
       rb.rsp.add("clearboxExplain", explainMap) 
     } 
   } 


@tommychheng 
Programmer and UC Irvine Graduate Student 
Find a great grad school based on research interests:
http://gradschoolnow.com <http://gradschoolnow.com?by-user=t> 


On 7/2/10 3:12 PM, osocurious2 wrote: 


> If I wanted to intercept a query and turn 
>      q=romantic italian restaurant in seattle 
> into 
>      q=romantic tag:restaurant city:seattle cuisine:italian 
> 
> would I subclass QueryComponent, modify the query, and pass it to super?
Or 
> is there a standard way already to do this? 
> 
> What about changing it to 
>     q=romantic city:seattle cuisine:italian&fq=type:restaurant 
> 
> would that be the same process, or is there a nuance to modifying a query 
> into a query+filterQuery? 
> 
> Ken 
> 

 

  _____  

View message @
http://lucene.472066.n3.nabble.com/Query-modification-tp939584p939600.html 
To start a new topic under Solr - User, email
ml-node+472068-464289649-124...@n3.nabble.com 
To unsubscribe from Solr - User, click
< (link removed) 
GZvcnRoZW90aGVyc3R1ZmZAZ21haWwuY29tfDQ3MjA2OHwtOTM0OTI1NzEx>  here. 

 


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

Reply via email to