solr

Error: “Missing required field” using embedded entities in Solr's DIH Configuration File

╄→гoц情女王★ 提交于 2019-12-12 00:56:17
问题 I am trying to import multiple tables from a MySQL database using Solr's Data Import Handler (DIH). The DIH does not import data from the second table, 'detail'. My database configuration file is <document> <entity name="item" pk="ListingId" query="SELECT * FROM item as item where listingid=360245270"> <entity name="detail" pk="ListingId" query="SELECT Body FROM detail where listingid='${item.listingid}'"> <field column="Body" name="Body" /> </entity> </entity> </document> I monitored the

solr group.field nullpointer exception

烈酒焚心 提交于 2019-12-12 00:47:31
问题 I have problem using group feature of solr. I simply can't use the feature. Here is the description of the problem. The group field that I use is defined as follows. field name="clusterid" type="string" indexed="true" stored="true" multiValued="false" The indexed "clusterid" field has valid values. Initially, I tried using "group" feature using Solrj client API on the above field. I started getting "HTTP status 500 Internal Server Errors..." Assuming that the syntax or the ordering of the

Encryption of dataConfig section fields in SOLR

泪湿孤枕 提交于 2019-12-12 00:29:35
问题 Im generating SOLR from DB with below dataConfig section in data-config.xml file, and it's working fine. <dataConfig> <dataSource type="JdbcDataSource" driver="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://127.0.0.1;databaseName=emp" user="user" password="user"/> <document name="reviews"> <entity name="COMMON" query="select id,name from users" > <field column="id" name="id"/> <field column="name" name="name"/> </entity> </document> </dataConfig> I want to ENCRYPT the url

Solr throwing rg.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Expected mime type application/octet-stream but got text/html

血红的双手。 提交于 2019-12-12 00:29:24
问题 I am using Solr + Spring Data Solr for Solr Indexing. I am getting following error when I am trying save the solr document. HTTP Status 500 - Request processing failed; nested exception is org.springframework.data.solr.UncategorizedSolrException: Expected mime type application/octet-stream but got text/html. Here is my code: Config: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:solr

How to update the document on solr 6.0?

安稳与你 提交于 2019-12-12 00:06:58
问题 I am using solr 6.0 version. This is my data { "id" : "14", "solrid" : "solr|school|14", "name" : "test update solr 14", "status" : "pending", "state" : "Andhra Pradesh", "board" : "CISCE", "updated" : "2016-05-26T02:24:25Z", "pincode" : "0" } I want to update the data on document as per id. example i want to change the name $doc = $update->createDocument(); $doc["id"] =$id; $doc["name"]="school"; $update->addDocument($doc); $update->addCommit(); $client->update($update); This code is correct

Returning documents using multi-valued field

六眼飞鱼酱① 提交于 2019-12-11 23:42:49
问题 I'm quite new to Solr and I'm supporting an existing Solr search engine which was written by someone else. I've been reading on Solr for the last couple of weeks so I'd consider myself beyond the basics. A particular field, let's say name, is multi-valued. For example, a document has a field "name" with values "Alice, Trudy". We want that the document is returned when "Alice" or "Trudy" is input and not when "Alice Trudy" is entered. Currently the document is even with "Alice Trudy". How

How to define a field type for field that contains both chinese and english

不打扰是莪最后的温柔 提交于 2019-12-11 23:13:40
问题 I am now using Solr to index on a field. This field will contain both Chinese and English. At the same time, I need to use tokenizer NGramTokenizerFactory for searching. Below is the current field type I defined for the field: <fieldType name="text_general2" class="solr.TextField" positionIncrementGap="100"> <analyzer type="index"> <tokenizer class="solr.NGramTokenizerFactory" minGramSize="1" maxGramSize="15"/> <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />

Returning an entire Document on Solr Suggestion

不问归期 提交于 2019-12-11 22:54:50
问题 Implemented a basic Solr Suggestion.I am able to get the suggested terms. But is there a way to return entire SOLR Document based on the suggestion? Here is the searchComponent and requestHandler in solr_config.xml. <searchComponent class="solr.SpellCheckComponent" name="suggest"> <lst name="spellchecker"> <str name="name">suggest</str> <str name="classname">org.apache.solr.spelling.suggest.Suggester</str> <str name="lookupImpl">org.apache.solr.spelling.suggest.tst.TSTLookupFactory</str> <str

Solrj indexing mechanism

◇◆丶佛笑我妖孽 提交于 2019-12-11 21:12:23
问题 I have a question about indexing mechanism using Solr in Java. If I create a documents and i want to find only field "name", solr will be index all fields? Or only index by field "name" in each document? 回答1: If you tell Solr to only store the field name in your schema, then only the field name will be stored. If you instruct Solr to store everything you send to it (like in the schemaless mode) and you send 400 fields, each of those fields will be stored. If you want to store information but

Solrj full-import not working

做~自己de王妃 提交于 2019-12-11 21:10:08
问题 I configured solr server on my Glassfish and everything works well. The problem is when I try to make reindex call using Solrj in my Java application. I'm using delta import via full import but it works well outside Solrj so I suppose there isn't problem http://wiki.apache.org/solr/DataImportHandlerDeltaQueryViaFullImport When I call http://localhost:8787/solr-4.2.1/db/dataimport?command=full-import&clean=true then reindex is correct and I see my new results. The problems starts when I do it