solr5

Is there a SolrJ query builder?

◇◆丶佛笑我妖孽 提交于 2020-04-10 02:53:41
问题 Using solr 5.2.0 was wondering is there a query builder API/Jar/Ckient similar to Elasticsearch query builder API or do we have to bassically do String Kungfu to build queries in Solr? 回答1: Unfortunately, in SolrJ there is no such thing as a Builder for the query that goes into the q -Parameter. BUT: As Solr already operates on Lucene, we can as well use the Lucene QueryBuilder. The resulting Query objects (e.g. PhraseQuery) have a toString() method that provides you with the query string you

How does Solr's schema-less feature work? How to revert it to classic schema?

走远了吗. 提交于 2020-01-12 03:00:07
问题 Just found that Solr 5 doesn't require a schema file to be predefined and it generates the schema, based on the indexing being performed. I would like to know how does this work in the background? And whether it's a good practice or not? Is there any way to disable it? 回答1: The schemaless feature has been in Solr since version 4.3. But it might be more stable only now as a concurrency issue with it was fixed in 4.10. It is also called managed schema. When you configure Solr to use managed

How does Solr's schema-less feature work? How to revert it to classic schema?

六眼飞鱼酱① 提交于 2020-01-12 02:59:53
问题 Just found that Solr 5 doesn't require a schema file to be predefined and it generates the schema, based on the indexing being performed. I would like to know how does this work in the background? And whether it's a good practice or not? Is there any way to disable it? 回答1: The schemaless feature has been in Solr since version 4.3. But it might be more stable only now as a concurrency issue with it was fixed in 4.10. It is also called managed schema. When you configure Solr to use managed

Solr: Retrieve non-stored fields from external data source

旧城冷巷雨未停 提交于 2019-12-24 16:16:50
问题 I'm currently working on a project on which I would like to index several data sources (Oracle and HBase) into Solr for full text search. Additionally, I want to be able to visualize the data I index into Solr. I'm still evaluating on whether to use Banana or Hue for this. Here comes the problem: As far as I understood the Solr docs, I can only search on indexed, but non-stored, fields, but not retrieve their original contents. I suppose this will make it quite difficult for the visualizers

Integration between Nutch 1.11(1.x) and Solr 5.3.1(5.x)

旧巷老猫 提交于 2019-12-21 17:37:16
问题 I just started using Nutch 1.11 and Solr 5.3.1 . I want to crawl data with Nutch , then index and prepare for searching with Solr . I know how to crawl data from web using Nutch 's bin/crawl command, and successfully got much data from a website in my local. I also started a new Solr server in local with below command under Solr root folder, bin/solr start And started the example files core under the example folder with below command: bin/solr create -c files -d example/files/conf And I can

How to fix: Error CREATEing SolrCore 'gettingstarted': Unable to create core

ぃ、小莉子 提交于 2019-12-20 09:53:45
问题 I'm getting this error when I try to create a new core in solr. root@ubuntu:/opt/solr# bin/solr create -c gettingstarted -n data_driven_schema_configs Setup new core instance directory: /var/solr/data/gettingstarted Creating new core 'gettingstarted' using command: http://localhost:8983/solr/admin/cores?action=CREATE&name=gettingstarted&instanceDir=gettingstarted Failed to create core 'gettingstarted' due to: Error CREATEing SolrCore 'gettingstarted': Unable to create core [gettingstarted]

How to get Suggestions in Solr 5.3.0

不打扰是莪最后的温柔 提交于 2019-12-19 10:46:11
问题 I am trying to implement auto complete feature using Solr 5.3.0 solrconfig.xml looks like this <searchComponent name="suggest" class="solr.SuggestComponent"> <lst name="suggester"> <str name="name">default</str> <str name="lookupImpl">FuzzyLookupFactory</str> <str name="dictionaryImpl">DocumentDictionaryFactory</str> <str name="field">suggest_ngram</str> <str name="weightField">price</str> <str name="suggestAnalyzerFieldType">text_suggest_ngram</str> <str name="buildOnStartup">true</str> <

Solr DataImportHandler is not indexing all data defined

让人想犯罪 __ 提交于 2019-12-18 09:38:19
问题 I am using solr5.3. I am trying to upload wikipedia page article dump to solr using "DataImportHandler" but I am getting only id and title files when i am querying. Below is my data-config.xml <dataConfig> <dataSource type="FileDataSource" encoding="UTF-8" /> <document> <entity name="page" processor="XPathEntityProcessor" stream="true" forEach="/mediawiki/page/" url="/mnt/TEST/enwiki-20150602-pages-articles1.xml" transformer="RegexTransformer,DateFormatTransformer" > <field column="id" xpath=

Can't ignore punctuation in titles - Solr 5 and Drupal

左心房为你撑大大i 提交于 2019-12-13 19:14:45
问题 The other week I posted a question about removing punctuation from solr search in Drupal. That was using Solr 4. However, since then the development I am doing has changed from solr 4 to solr 5, and now I am having the same problem but the fix at Can't remove punctuation in Solr no longer works. This causes problems when sorting by titles since a lot of content titles have quotes around. <field name="label" type="text" indexed="true" stored="true" termVectors="true" omitNorms="true"/>

How to run a sql query in solr

…衆ロ難τιáo~ 提交于 2019-12-12 21:15:09
问题 Ok now I have successfully install solr and index by database with following structure : DB_NAME - solr, Table - users my db-data-config.xml file : <dataConfig> <dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/solr" user="root" password="" /> <document> <entity name="users" query="select id,name from users;" /> <field column="ID" name="id" /> <field column="NAME" name="name" /> </document> </dataConfig> Which returns rows of database table