solrj

Exception writing document id to the index; possible analysis error

假如想象 提交于 2019-12-01 07:00:44
I am getting the above error while indexing the documents. <field name="a_suggest" type="my_suggest_field" indexed="true" stored="false"/> <field name="b_suggest" type="my_suggest_field" indexed="true" stored="false" /> <field name="c_suggest" type="my_suggest_field" indexed="true" stored="false"/> <fieldType name="my_suggest_field" class="solr.TextField" positionIncrementGap="100"> <analyzer type="index"> <tokenizer class="solr.WhitespaceTokenizerFactory"/> <filter class="solr.LowerCaseFilterFactory" /> <filter class="solr.EdgeNGramFilterFactory" maxGramSize="10" minGramSize="2"/> </analyzer>

Solrj with Solr Suggester

瘦欲@ 提交于 2019-12-01 05:21:28
What is the correct way of getting results from solrj using Solr Suggester? This is my request: SolrQuery query = new SolrQuery(); query.setRequestHandler("/suggest"); query.setParam("suggest", "true"); query.setParam("suggest.build", "true"); query.setParam("suggest.dictionary", "mySuggester"); query.setParam("suggest.q", "So"); QueryResponse response = server.query(query); However I found it extremely difficult to get the response. The way I got the response is with this: NamedList obj = (NamedList)((Map)response.getResponse().get("suggest")).get("mySuggester"); SimpleOrderedMap obj2 =

Exception writing document id to the index; possible analysis error

匆匆过客 提交于 2019-12-01 05:17:00
问题 I am getting the above error while indexing the documents. <field name="a_suggest" type="my_suggest_field" indexed="true" stored="false"/> <field name="b_suggest" type="my_suggest_field" indexed="true" stored="false" /> <field name="c_suggest" type="my_suggest_field" indexed="true" stored="false"/> <fieldType name="my_suggest_field" class="solr.TextField" positionIncrementGap="100"> <analyzer type="index"> <tokenizer class="solr.WhitespaceTokenizerFactory"/> <filter class="solr

Solrj with Solr Suggester

强颜欢笑 提交于 2019-12-01 02:42:28
问题 What is the correct way of getting results from solrj using Solr Suggester? This is my request: SolrQuery query = new SolrQuery(); query.setRequestHandler("/suggest"); query.setParam("suggest", "true"); query.setParam("suggest.build", "true"); query.setParam("suggest.dictionary", "mySuggester"); query.setParam("suggest.q", "So"); QueryResponse response = server.query(query); However I found it extremely difficult to get the response. The way I got the response is with this: NamedList obj =

Search with various combinations of space, hyphen, casing and punctuations

[亡魂溺海] 提交于 2019-11-30 18:49:34
My schema: <fieldType name="text" class="solr.TextField" positionIncrementGap="100"> <analyzer> <tokenizer class="solr.WhitespaceTokenizerFactory"/> <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" /> <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1" splitOnNumerics="0"/> <filter class="solr.LowerCaseFilterFactory"/> <filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/> <

How to Implement custom Solr Repository using Spring Data Solr for multiple cores and repositories

匆匆过客 提交于 2019-11-30 16:10:44
I want to have access to multiple/2 repos in one service using spring-data-solr. From Spring Data Solr multiple cores and repository I know 'multicore support via namespace config is unfortunately an open issue'. Can you please help me with the following example, how can I create custom Repos? My applicationContext.xml has two Solr Templates defined as below: <!-- Enable Solr repositories and configure repository base package --> <solr:repositories base-package="com.ay.api.repository"/> <!-- Configures HTTP Solr server --> <solr:solr-server id="solrServer" url="${solr.server.url}"/> <!--

Indexing PDF with Solr

心不动则不痛 提交于 2019-11-30 08:26:27
Can anyone point me to a tutorial. My main experience with Solr is indexing CSV files. But I cannot find any simple instructions/tutorial to tell me what I need to do to index pdfs. I have seen this: http://wiki.apache.org/solr/ExtractingRequestHandler But it makes very little sense to me. Do I need to install Tika? Im lost - please help With solr-4.9 (the latest version as of now), extracting data from rich documents like pdfs, spreadsheets(xls, xlxs family), presentations(ppt, ppts), documentation(doc, txt etc) has become fairly simple. The sample code examples provided in the downloaded

solrj: how to store and retrieve List<POJO> via multivalued field in index

泪湿孤枕 提交于 2019-11-30 07:31:57
问题 My use case is an index which holds titles of online media. The provider of the data associates a list of categories with each title. I am using SolrJ to populate the index via an annotated POJO class e.g. @Field("title") private String title; @Field("categories") private List<Category> categoryList; The associated POJO is public class Category { private Long id; private String name; ... } My question has two parts: a) is this possible via SolrJ - the docs only contain an example of @Field

Is there a way to dynamically update a synonym file without restarting Solr server?

痴心易碎 提交于 2019-11-30 02:30:31
As we know there is a synonym.txt file in conf directory, which I wanted to update whenever I found some new synonym words... So is there any way to update that file dynamically without restarting the Solr server and will my search result consider the new synonym words?? please help me if anyone have any idea.. thanks in advance... I think you can build your own SynonymFilterFactory that extends the original and use your a custom FSTSynonymFilterFactory as delegator. your SynonymFilterFactory should extends the original SlowSynonymFilterFactory and call: map = loadSolrSynonyms(loader, true,

Search with various combinations of space, hyphen, casing and punctuations

Deadly 提交于 2019-11-30 02:11:41
问题 My schema: <fieldType name="text" class="solr.TextField" positionIncrementGap="100"> <analyzer> <tokenizer class="solr.WhitespaceTokenizerFactory"/> <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" /> <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1" splitOnNumerics="0"/> <filter class="solr.LowerCaseFilterFactory