Lucene and Solr
I am creating the Index using Lucene. But using t开发者_Go百科he SolrSearch engine to search.
My problem is
while I index I add each filed in my code using the code doc.add(fieldname, val, tokenized)
- **But my code does not see the schema file
- Even copy fields I need to add manually**
- Now I want to use the autosuggest feature of Solr
- I do not know how to enable this feature while creating the Index
But when I use the simplePostTool to post the data through Solr all is fine.
I cannot do that because I have to get some text from different urls.
So can someone please advise me how can I achieve this? A sample code will be very helpful. In any case If I can have some code that can see the schema file and use the fieldTypes it would be great.
Thanks everyone.
--pramila
See EmbeddedSolrServer at:
http://wiki.apache.org/solr/Solrj
It's a pure Java API to Solr, which will allow you to index your documents using the schema.xml you have defined.
精彩评论