lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giovanni Gherdovich <g.gherdov...@gmail.com>
Subject Re: how to retrieve a doc from its docID ?
Date Sat, 30 Jun 2012 13:41:16 GMT
Sascha:
> You should also make sure that the field definition (in schema.xml) for 'text'
> says stored="true", otherwise the field will not be returned.

I guess you're hitting my problem.
The field I want to search on is declared with store=false in
the schema.xml:

-- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8
<field name="text" type="text" indexed="true" stored="false"
multiValued="true"/>
-- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8

I guess I have to re-index all my corpus again,
after modifying that declaration in my schema.xml

(or choosing a different field in the example schema -- which one?)

Sascha:
> did you include the fl parameter in the Solr query URL?
> If that's the case make sure that the field name 'text' is mentioned there.

no, I am not using the "fiel list" (fl) param. should I?

Jack:
> Don't try doing this with the "text" field of the Solr example schema,
> copied to the catchall field. [...] he catchall field is designed for indexing,
> not result display.

Uhm... I am using the field 'text', which is of fieldType 'text',
from the example schema. I choosed it with no clue -- I guessed
what could have been the fields for my docs, and picked up that one.
Should I have made a different choice?

Are you saying that all fields then are "copied" into some "behind the scenes"
'text' field, and that is the real purpose of the following field
in the example schema?

-- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8
<field name="text" type="text" indexed="true" stored="false"
multiValued="true"/>
-- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8  -- -- >8

Then, what is a better suited field from the pool of fields
that are available off-the-shelf in the example schema,
given that my goal is to make text searches into that field?

Jack:
> Rather, add the original source field(s)
> to "fl" that was/were copied to the catchall field.

If anything has been copied from a field to another,
this has happened beyond my intentions :-)
I picked up the 'text' field since I thought it was
good for text search. You're saying it isn't,
if I understand you correctly.

> But do make sure that "stored=true" for any field
> you want returned in search results.

ok noted.

cheers,
GGhh

Mime
View raw message