You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Chris Hostetter <ho...@fucit.org> on 2011/11/07 20:35:41 UTC

Re: question from a beginner

: So for example, if searching on "Santa Clara"  I would like to display all
: sections/paragraphs where "Santa Clara" occurs in the document. 

can you clarify what you mean by "display" and how you intend to use that 
info?

it may be obvious to you what you mean by "display" but depending on the 
answer there are differnet approachs to take.

for example: you may be able to tune highlighting to show you all of the 
"snippets" of each document where the search matches, but the results will 
still just contain one "document" for your file, so things like facet 
counts would still only return "1" doc per file -- and if you want a UI 
that lets the user "click" on each match, you would still only have one 
file to return to them for all of the snippets in each document.

alternately, you could split the word file up into multiple files per 
section (or paragraph, or page -- whatever you want), and index them 
independently, and then each "matching document" would corrispond to the 
section of the file that you've split up - so facet counts and stuff 
like that owuld corrispond to your individuall little files, and users 
could click on each result and your UI could return that micro-file, 
etc...

bottom line: think through your entire use case, and how you want users to 
interact with the results, and then model your documents based on that.  
then figure out how to feed the data into solr to match your model.


-Hoss