lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Spam <>
Subject Re: Very basic questions: Indexing text
Date Mon, 28 Jun 2010 22:49:02 GMT
On Jun 28, 2010, at 2:00 PM, Ahmet Arslan wrote:

>> 1) I can get my docs in the index, but when I search, it
>> returns the entire document.  I'd love to have it only
>> return the line (or two) around the search term.
> Solr can generate Google-like snippets as you describe. 

Here's how I commit my documents:

for i in `find . -name \*.txt`; do
        (( J++ ))
        curl "http://localhost:8983/solr/update/extract?$J" -F "myfile=@$i";

echo "------------- Committing"
curl "http://localhost:8983/solr/update/extract?commit=true"

Then, I try to query using http://localhost:8983/solr/select?rows=10&start=0&fl=*,score&hl=true&q=testing
but I only get back the document ID rather than the snippet:

<float name="score">0.05030759</float>
<arr name="content_type">
<str name="id">doc16</str>

 I'm using the schema.xml from the "lucid imagination: Indexing text and html files" tutorial.


View raw message