开发者

Solr no search results on new field

I added a multivalue field to schema.xml as follows:

<field name="fieldsharedsite" type="string" indexed="true" stored="false" multiValued="true" /> 
<field name="fieldsharedchannelnew" type="string" indexed="true" stored="false" multiValued="true" /> 

When I search for a document contents, I get the following result:

<fieldsharedsite><item key="0">33</item></fieldsharedsite> 
<fieldsharedchannelnew><item key="0">52</item></fieldsharedchannelnew> 

so I am sure fieldsharedchannelnew is in the results

When I do the following search: q=fieldshar开发者_JAVA技巧edsite:33 I do get the document but when I do q=fieldsharedchannelnew:52 I don't get any results.

fieldsharedsite has been here for a while and I'm trying to add fieldsharedchannelnew. I did reindex all the content but did not help the search.

If I look at the schema browser, I have for fieldsharedsite:

 Field Type: string
 Properties:  Indexed, Multivalued, Omit Norms, Sort Missing Last
 Schema:  Indexed, Multivalued, Omit Norms, Sort Missing Last
 Index:  (unstored field)
 Index Analyzer: org.apache.solr.schema.FieldType$DefaultAnalyzer 
 Query Analyzer: org.apache.solr.schema.FieldType$DefaultAnalyzer 
 Docs:  902

and for fieldsharedchannnelnew I have:

 Field Type: string
 Properties:  Indexed, Multivalued, Omit Norms, Sort Missing Last
 Index Analyzer: org.apache.solr.schema.FieldType$DefaultAnalyzer 
 Query Analyzer: org.apache.solr.schema.FieldType$DefaultAnalyzer 

What step did I miss in adding the fieldsharedchannelnew index? Why its not returning any results when I search for it?


The schema browser result for the field fieldsharedchannnelnew does not indicate it is populated in the documents.
the Docs information is missing, as for fieldsharedsite which shows it exists in 902 docs.

Field Type: string
Properties:  Indexed, Multivalued, Omit Norms, Sort Missing Last
Index Analyzer: org.apache.solr.schema.FieldType$DefaultAnalyzer 
Query Analyzer: org.apache.solr.schema.FieldType$DefaultAnalyzer

When I search for a document contents, I get the following result:

<fieldsharedsite><item key="0">33</item></fieldsharedsite> 
<fieldsharedchannelnew><item key="0">52</item></fieldsharedchannelnew>

As the fields are not stored, the fields would not be returned with the results.
Is this the data you are feeding Solr ? how do they appear in results ?
Are you using value as is or want to use copyfield ?

You may mark the fields as stored and reindex the contents and check if they are returned with the results and the schema browser shows the Docs information.
If so, you should be able to search it as well.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜