solr-schema

Solr Composite Unique key from existing fields in schema

删除回忆录丶 提交于 2020-01-19 05:28:59
问题 I have an index named LocationIndex in solr with fields as follows: <fields> <field name="solr_id" type="string" stored="true" required="true" indexed="true"/> <field name="solr_ver" type="string" stored="true" required="true" indexed="true" default="0000"/> // and some more fields </fields> <uniqueKey>solr_id</uniqueKey> But now I want to change schema so that unique key must be composite of two already present fields solr_id and solr_ver ... something as follows: <fields> <field name="solr

Solr Composite Unique key from existing fields in schema

本秂侑毒 提交于 2020-01-19 05:26:29
问题 I have an index named LocationIndex in solr with fields as follows: <fields> <field name="solr_id" type="string" stored="true" required="true" indexed="true"/> <field name="solr_ver" type="string" stored="true" required="true" indexed="true" default="0000"/> // and some more fields </fields> <uniqueKey>solr_id</uniqueKey> But now I want to change schema so that unique key must be composite of two already present fields solr_id and solr_ver ... something as follows: <fields> <field name="solr

How to configure solr dataimport handler to parse wikipedia xml document?

房东的猫 提交于 2019-12-13 04:32:21
问题 So this is what I have done so far. I have added a request handler in solrconfig.xml as follows: <requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler"> <lst name="defaults"> <str name="config">wiki-data-config.xml</str> </lst> </requestHandler> In the same configuration directory I have created a file wiki-data-config.xml which contains the following, <dataConfig> <dataSource type="FileDataSource" encoding="UTF-8" /> <document> <entity name="page" pk=

How to enforce an exact match to get the highest priority?

筅森魡賤 提交于 2019-12-13 00:01:25
问题 I am indexing and searching 5 fields, which are tokenized/filtered in various ways. BUT, I would like that when I search, if the query I entered matches a value in field 1, it will be the top result I get back. How would I define: The field The query in such a way this field gets priority IF there is 100% match In my schema, I have the field <field name="na_title" type="text_names" indexed="true" stored="false" required="true" /> text_names is : <fieldType name="text_names" class="solr

Solr query not working properly

女生的网名这么多〃 提交于 2019-12-12 03:58:05
问题 I don't know what is going wrong. This is actually a very simple query which is not working in my Solr Search. http://IP_ADDRESS/solr/CORE_NAME/select?indent=on&q=Bangalore&wt=json There are more than 100 records which contains the word Bangalore in my database. However the the results contain just 2 records. Is there anything that needs to be corrected in the schema or configuration. Can i get some quick help in this? Thanks. EDIT 1: My Filter Query below for works perfectly. http://IP

Is there way to boost original term more while using Solr synonyms?

烂漫一生 提交于 2019-12-03 12:16:48
问题 For example I have synonyms laptop,netbook,notebook in index_synonyms.txt When user search for netbook I want to boost original text more then expanded by synonyms? Is there way to specify this in SynonymFilterFactory? For example use original term twice so his TF will be bigger 回答1: As far as I know, there is no way to do this with the existing SynonymFilterFactory. But following is a trick you can use to get this behavior. Let's say your field is called title . Create another field which is

Is there way to boost original term more while using Solr synonyms?

人走茶凉 提交于 2019-12-03 02:39:35
For example I have synonyms laptop,netbook,notebook in index_synonyms.txt When user search for netbook I want to boost original text more then expanded by synonyms? Is there way to specify this in SynonymFilterFactory? For example use original term twice so his TF will be bigger As far as I know, there is no way to do this with the existing SynonymFilterFactory. But following is a trick you can use to get this behavior. Let's say your field is called title . Create another field which is a copy of this, say title_synonyms . Now ensure that SynonymFilterFactory is used as an analyzer only for

Solr - case-insensitive search do not work

江枫思渺然 提交于 2019-12-01 05:27:44
I want to apply case-insensitive search for field myfield in solr. I googled a bit for that , and i found that , i need to apply LowerCaseFilterFactory to Field Type and field should be of solr.TextFeild . I applied that in my schema.xml and re-index the data, then also my search seems to be case-sensitive. Below is search that i perform. http://localhost:8080/solr/select?q=myfield:"cloud university"&hl=on&hl.snippets=99&hl.fl=myfield Below is definition for field type <fieldType name="text_en_splitting" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">

Solr - case-insensitive search do not work

时光总嘲笑我的痴心妄想 提交于 2019-12-01 03:40:59
问题 I want to apply case-insensitive search for field myfield in solr. I googled a bit for that , and i found that , i need to apply LowerCaseFilterFactory to Field Type and field should be of solr.TextFeild . I applied that in my schema.xml and re-index the data, then also my search seems to be case-sensitive. Below is search that i perform. http://localhost:8080/solr/select?q=myfield:"cloud university"&hl=on&hl.snippets=99&hl.fl=myfield Below is definition for field type <fieldType name="text

Solr Composite Unique key from existing fields in schema

大兔子大兔子 提交于 2019-11-27 21:30:19
I have an index named LocationIndex in solr with fields as follows: <fields> <field name="solr_id" type="string" stored="true" required="true" indexed="true"/> <field name="solr_ver" type="string" stored="true" required="true" indexed="true" default="0000"/> // and some more fields </fields> <uniqueKey>solr_id</uniqueKey> But now I want to change schema so that unique key must be composite of two already present fields solr_id and solr_ver ... something as follows: <fields> <field name="solr_id" type="string" stored="true" required="true" indexed="true"/> <field name="solr_ver" type="string"