solr4

How to compare two columns using Solr?

*爱你&永不变心* 提交于 2019-12-11 12:13:32
问题 Compare two columns in solr if two fields are equal display true or else false. CASE WHEN o_is_follow = o_follow_id THEN 'TRUE' ELSE 'FALSE'. 回答1: As per as I know comparing one field to another within a document is not supported in either Solr . I think it can be achieved by one option of creating another field while indexing only. You can have another field (boolean) . Make this field as boolean type and can be used while searching. Create a o_is_follow_present field and set it to true for

How to find List of unindexed file in alfresco

落花浮王杯 提交于 2019-12-11 10:49:10
问题 How can i find the list of UN-indexed file.I just want to perform a task i want to get all those file that is UN-indexed and want to fix and make indexed. I m using alfresco 5.0. How to find the reason why the file failed to get indexed ? 回答1: This should work just fine, it will give you a list of nodedb IDs, which you can then use to run the REINDEX action separately for each one of them. https://localhost:8443/solr4/alfresco/afts?q=DOC_TYPE:UnindexedNode 回答2: Try this query on Node Browser

In Solr search multiple objects not updated

爱⌒轻易说出口 提交于 2019-12-11 08:29:37
问题 In solr search multiple objects are not updated or inserted. Please help me. "materialNames":[ { "material_id":1, "description":"Motor Oil", "business":"", "residential":"", "notes":"" }, { "material_id":2, "description":"Oil Filters", "business":"", "residential":"", "notes":"" } ] 回答1: You are trying to insert Embedded document into Solr Note that: 1> I have used Solr 4.7.0 2> I have referred Embedded Documents In Solr you can follow the steps mentioned in this. OR Below are the steps Step

Solr: Set field boost at index-time with DataImportHandler

最后都变了- 提交于 2019-12-11 06:16:43
问题 I need to set a field boost at index-time with DataImportHandler. I tried to do somethings like this: <entity name="places" query="Select id, boost, text from table"> <field name="id" column="id" /> <field name="boost" column="boost" /> <field name="1_text" column="text" boost="${boost}" /> </entity> but it doesn't works. That is the error: Caused by: java.lang.NumberFormatException: For input string: "${boost}" An other approch that i did is to try also to use a script (an transformer, but i

searching quote char with surround query parser in SOLR

戏子无情 提交于 2019-12-11 05:43:19
问题 I am trying to search for two subsequent words as follow: {!surround}FieldName:first w second The query works great, but SOLR throws parse exception when one of the words contains quote char, i.e {!surround}FieldName:first w sec"ond I have tried to escape the qutoe: {!surround}FieldName:first w sec\"ond but it didnt help. I tried also using the v parameter of LocalParams, but no good either. {!surround v="first w sec\"ond"}FieldName I am currently running Solr 4.0. Does anybody knows how to

Include singular search results when search for plural in Solr

混江龙づ霸主 提交于 2019-12-11 03:38:56
问题 I'm working with Solr 4.1, and got it working correctly. I have the terms in the document which contains "school". It gives search result correctly when searching for "school". However, I want Solr to include these results when searching for "schools". So basically I want Solr to include singular terms in its search results when searching for plural terms. Any idea how to do it? 回答1: You need to apply stemming to your indexed fields in order to achieve this behavior. Please see the Stemming

Querying binary fields in Solr

可紊 提交于 2019-12-11 02:59:50
问题 I'm using Solr to index records consisting of binary fields. I've specified the fields in schema.xml as such: <field name="id" type="binary" indexed="true" stored="true" required="true" multiValued="false" /> I'm able to add records to the index via a POST request, encoding and sending the fields as Base64 Strings. The size of the collection's data directory is growing so I know it is storing something; however, when doing a match all query (q=*:*) I strangely get some documents found but

How to store and retrieve Apache Solr fields as a tree (multidimensional array)?

流过昼夜 提交于 2019-12-11 02:45:13
问题 I need to store and retrieve results as multidimensional tree instead of flat "key" => "value" pairs. Let me explain with an example, I have products which have many categories and each category has a priority value. Sample structure: { name: "Sample Product" categories: [ { category: "Category 1", priority: 9 }, { category: "Category 2", priority: 5 } ... ] } Here is my data-config.xml: <dataConfig> <dataSource name="ds" type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql:/

How to setup Solr Cloud with two search servers?

别来无恙 提交于 2019-12-10 18:50:49
问题 Hi I'm developing rails project with sunspot solr and configuring Solr Cloud. My environment: rails 3.2.1, ruby 2.1.2, sunspot 2.1.0, Solr 4.1.6. Why SolrCloud: I need more stable system - oftentimes search server goes on maintenance and web application stop working on production. So, I think about how to make 2 identical search servers instead of one, to make system more stable: if one server will be down, other will continue working. I cannot find any good turtorial with simple, easy to

cursorMark is stateless and how it solves deep paging

為{幸葍}努か 提交于 2019-12-10 16:21:00
问题 as specified here cursormark is stateless but I don't get how it it is solving deep paging issue if its stateless. Does solr stores the indexed data in sort by unique key field if so then it will clarify my confusion. if I am wrong please explain how the cursormark solves deep paging. Because as cursormark is stateless it also need to sort and claculate cursormark every time request a query and this is similar to start=#start-position. 回答1: From the link you referenced... Cursors in Solr are