solr

How to serialize/deserialize a map with Solr/Lucene?

感情迁移 提交于 2019-12-25 02:55:57
问题 I am new to solr, and I am facing a problem when I try to serialize/deserialize a Map in Solr. I use Spring Data Solr in my Java application as follow: @Field("mapped_*") private Map<String, String> values; It flatten and serializes my map in Solr as follow: "key1" : "value1" "key2" : "value2" ... However, when I run a search, the returned objects have this field always set as NULL. Deserialization does not work on this particular field, it looks like it does not recognize the key1, key2...

SOLR DIH throwing error “unsupported type : class java.lang.String”

独自空忆成欢 提交于 2019-12-25 02:53:10
问题 I'm trying to import a MS SQL field containing a PDF BLOB into SOLR and getting the following error: Exception while processing: attachment document : SolrInputDocument(fields: []):org.apache.solr.handler.dataimport.DataImportHandlerException: java.lang.RuntimeException: unsupported type : class java.lang.String at org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(DataImportHandlerException.java:63) at org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow

Using Apache Solr's boost query function with Spring in Java

二次信任 提交于 2019-12-25 02:46:28
问题 I'm writing a Java application that is using Apache Solr to index and search through a list of articles. A requirement I am dealing with is that when a user searches for something, we are supplying a list of recommended related search terms, and the user has the option to include those extra terms in their search. The problem I'm having, however, is that we want the user's original search term to be prioritized, and results that match that should appear before results that only match related

fulltext search with mysql FT or Sphinx

雨燕双飞 提交于 2019-12-25 02:23:50
问题 I have read many articles about Sphinx or Solr or MySQL FT. I have a table with over 1 milion products and need to make an fulltext search and get results under 1 second ... . Does anyone has any experience with those kind of fast search? As clint language I am using PHP. As capacity I have debian5 8GB ram 4 core cpu's. Thanks Nik 回答1: We've made some Sphinx performance measurements that are described here http://www.ivinco.com/blog/plain-rt-and-mixed-indexes-performance-comparison/ As it can

Solr with Jetty on LAMP server - Admin page access issue

纵然是瞬间 提交于 2019-12-25 02:00:25
问题 I have Solr with its default Jetty that came with example directory installed on Linux server which has apache2 as its web server . Now, within the same private LAN, when I open a browser and type in http://<ip-address>:8983/solr works ONLY when I do port forwarding otherwise it doesn't work . I am not sure what could be the problem? Please note this installation has been done on a remote server in a hosting environment for production deployment and I am a beginner wrt deployment stuff. 回答1:

Including multi-word stopwords in Solr

僤鯓⒐⒋嵵緔 提交于 2019-12-25 01:58:02
问题 Is it possible to include multi-word stopwords in stopfilterfactory of Solr ? If yes, kindly tell me the way. Right now first I am putting all the multiple-word stopwords in synonyms.txt file and then using one synonym for all these words in stopwords.txt , but its not working. 回答1: I give a try this kind of a syntax stopwords.txt stop word more long stop word and it looks like it working. Check out my test case here - https://github.com/MysterionRise/information-retrieval-adventure/blob

How to add a new field to the document in a custom Solr Filter

半城伤御伤魂 提交于 2019-12-25 01:54:20
问题 I am writing a custom filter in Solr to post a token to Apache Stanbol for enhancement and index the response to a different field in the same document. In my test code below I have got the Stanbol response and have added it as a new document to Solr. My requirement is to add the stanbolResponse as a field value to the same document being indexed. I think this can be done if I can retrieve the document Id from the TokenStream in the filter. Can anyone please help me with a sample code/example

Can we have multiple entity in solr result structure

Deadly 提交于 2019-12-25 01:43:32
问题 currently my result of solr is { "responseHeader":{ "status":0, "QTime":0, "params":{ "indent":"on", "start":"0", "q":"deepak\r\n", "wt":"json", "rows":"10", "version":"2.2"}}, "response":{"numFound":1,"start":0,"docs":[ { "summary":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec vel porta odio. Maecenas ligula erat, ullamcorper ut iaculis non, vulputate vel velit. Cras facilisis, lectus a cursus accumsan, nunc libero aliquam magna, eu porta nulla risus quis nisi.", "id":"1",

How to sort the top 100 results of solr query based on a specific filed?

爷,独闯天下 提交于 2019-12-25 01:25:44
问题 i want to sort the top 100documents of a solr using a specific field but it sort the whole result set and then display result the following is my code. query1.setQuery(" Natural Language "); query1.setStart(0); query1.setRows(100); int i=0; query1.set("df","Text"); query1.setFields("PaperID","TotalPageRank"); query1.setSort("customrank", SolrQuery.ORDER.desc); Is it possible using solr query to sort the top 100 documents using customrank field? 回答1: It is very simple.. SolrQuery query1 = new

Does Solr have an equivalent of “strict order operator” that Sphinx has?

别来无恙 提交于 2019-12-25 01:16:25
问题 I'm choosing between Solr and Sphinx. Sphinx doc page has a section called "5.3. Extended query syntax" which describes the following search parameters (among others) : strict order operator (example: aaa << bbb << ccc) - NEAR, generalized proximity operator (example: hello NEAR/3 world NEAR/4 "my test") - search according to distance between words SENTENCE/PARAGRAPH (example: "Bill Gates" PARAGRAPH "Steve Jobs") - search inside a sentence/paragraph Does Solr have any similar functionality?