lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Weiss <>
Subject Re: Please help me articulate this query
Date Mon, 15 Dec 2008 20:32:02 GMT
I think in this case you would want to index each question with the  
possible referrers ( by title might be too imprecise, I'd go with  
filename or ID) and then do a search like this (assuming in this case  
it's by filename)

q=(referring:TomCruise.html) OR (question: Tom AND Cruise)

Which seems to be what you're thinking.

I would make the referrer a type "string" though so that you don't  
accidentally pull in documents from a different subject (Tom Cruise  
this would work ok, but imagine you need to distinguish between George  
Washington and George Washington Carver).


On Dec 15, 2008, at 2:59 PM, Derek Springer wrote:

> Hey all,
> I'm having trouble articulating a query and I'm hopeful someone out  
> there
> can help me out :)
> My situation is this: I am indexing a series of questions that can  
> either be
> asked from a main question entry page, or a specific subject page. I  
> have a
> field called "referring" which indexes the title of the specific  
> subject
> page, plus the regular question whenever that document is submitted  
> from a
> specific specific subject page. Otherwise, every document is indexed  
> with
> just the question.
> Specifically, what I am trying to do is when I am on the page specific
> subject page (e.g. Tom Cruise) I want to search for all of the  
> questions
> asked from that page, plus any question asked about Tom Cruise.  
> Something
> like:
> q=(referring:Tom AND Cruise) OR (question:Tom AND Cruise)
> "Have you ever used a Tom Tom?" - Not returned
> "Where is the best place to take a cruise?" - Not returned
> "When did he have is first kid?" - Returned iff question was asked  
> from Tom
> Cruise page
> "Do you think that Tom Cruise will make more movies?" - Always  
> returned
> Any thoughts?
> -Derek

View raw message