Good day,

[BACKGROUND]
I am currently using hibernate-search for my web app, and now, I'm trying to
use solr to search over the index generated by hibernate-search.

[SCENARIO]
Since I was a newbie, I first tried creating a basic solrconfig.xml (
identical to the one in the example, except that the dataDir points to the
directory of the index created by hibernate-search ). Next i tried creating
a basic schema.xml. Again, practically the same as that of example but with
the following difference

<schema name="mybean" version="1.1">
  ...
  <fields>
    <field name="id" type="string" indexed="true" stored="true"
required="true" />
    <field name="_hibernate_class" type="string" indexed="true"
stored="true" required="true" />
    <field name="mainText" type="string" indexed="true" stored="true"
required="true" />
    <field name="anotherText" type="string" indexed="true" stored="true"
required="true" />
  </fields>

  <uniqueKey>id</uniqueKey>
  
  <defaultSearchField>mainText</defaultSearchField>

  ...
</schema>

and I commented out the copyField's

[PROBLEM]
Although I can do searches with "mainText" and "anotherText" I cannot,
however, see those fields from the results. I can only see from the doc "id"
and "_hibernate_class". 

[ATTEMPTS TO DEBUG]
* I verified my schema from the solr server admin and I saw that the schema
is the one that I just mentioned.
* I check the field names of the index via luke and verified that I declared
them in the schema.xml properly.
* I verified that I didn't change anything from the schema.xml aside from
those I mentioned above.
* I even tried removing _hibernate_class ( but I can still see the two
fields from the doc - "id" and "_hibernate_class" ).
* I tried taking a closer look at luke and I noticed that in the Results
table of the 'Search' tab, I can see that only "id" and "_hibernate_class"
have values while both "mainText" and "anotherText" don't have. However, I
am sure that they do have values because I can perform searches against
them. Not sure why though.

[QUESTION]
What could be the problem? .....Or what else can I do to debug this problem?

Thanks,
Franz
-- 
View this message in context: 
http://www.nabble.com/-newbie--how-to-debug-the-schema--tf4237012.html#a12055272
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to