I found the solution.
If somebody will run into the same problem, here is how I solved it.
- while uploading the document:
req.setParam(uprefix, attr_);
req.setParam(fmap.content, attr_content);
req.setParam(overwrite, true);
req.setParam(commit, true);
- in the query:
http://localhost:8983/solr/select?q=attr_content:%22Django%22rows=4
- edit the solrconfig.xml in the requesthandler params
str name=flid,title/str
so that you won't get the whole text content inside the response.
Regards,
Chuck
On Fri, Nov 13, 2009 at 11:21 AM, Chuck Mysak chuck.my...@gmail.com wrote:
Hello list,
I'm new to solr but from what I'm experimenting, it's awesome.
I have a small issue regarding the highlighting feature.
It finds stuff (as I see from the query analyzer), but the highlight list
looks something like this:
lst name=highlighting
lst name=c:\0596520107.pdf/
lst name=c:\0470511389.pdf/
/lst
(the files were added using ContentStreamUpdateRequest req = new
ContentStreamUpdateRequest(/update/extract); and I set the literal.id
to the filename)
My solrconfig.xml requesthandler looks like:
requestHandler name=standard class=solr.SearchHandler
default=true
!-- default values for query parameters --
lst name=defaults
str name=echoParamsexplicit/str
!--
int name=rows10/int
str name=fl*/str
str name=version2.1/str
--
bool name=hltrue/bool
int name=hl.snippets3/int
int name=hl.fragsize30/int
str name=hl.simple.pre![CDATA[span]]/str
str name=hl.simple.post![CDATA[/span]]/str
str name=hl.fl*/str
bool name=hl.requireFieldMatchtrue/bool
float name=hl.regex.slop0.5/float
str name=hl.regex.pattern[-\w ,/\n\']{20,200}/str
bool name=hl.usePhraseHighlightertrue/bool
/lst
/requestHandler
The schema.xml is untouched and downloaded yesterday from the latest stable
build.
At first, I thought it had something to do with the extraction of the pdf,
but I tried the demo xml docs also and got the same result.
I'm new to this, so please help.
Thank you,
Chuck