solr

Creating collections in SOLR

荒凉一梦 提交于 2019-12-12 11:17:45
问题 On the web searching for collections in SOLR i found only information about distributed search and so on but when I understand the concept of correclty collections are running on the same server instance using the same schema but are logically completely separated. Is this correct? So I can have 3 collections and searching on one collection won´t output results of another right? Would it be possible to search on more than one collection at once? But my main priority: How do I create a second

How to setup Lucene/Solr for a B2B web app?

独自空忆成欢 提交于 2019-12-12 11:16:54
问题 Given: 1 database per client (business customer) 5000 clients Clients have between 2 to 2000 users (avg is ~100 users/client) 100k to 10 million records per database Users need to search those records often (it's the best way to navigate their data) Possibly relevant info: Several new clients each week (any time during business hours) Multiple web servers and database servers (users can login via any web server) Let's stay agnostic of language or sql brand, since Lucene (and Solr) have a

How can I get the size of a Solr document?

孤人 提交于 2019-12-12 10:56:02
问题 I would like to know the size in bytes of individual Solr documents/responses. Is there a straightforward way to figure this out? We are using the solrj java client. I've looked around and have only found ways to determine the size of the index, but nothing on the size of the documents themselves. 回答1: the size and the document of solr are composed of both : - indexes compressed - files compressed A easy way to know the size of you solr core / node is to get in solr admin So in my case we

What are docValues in Solr? When should I use them?

好久不见. 提交于 2019-12-12 10:38:01
问题 So, I have read multiple sources that try to explain what 'docValues' are in Solr, but I don't seem to understand when I should use them, especially in relation to indexed vs stored fields. Can anyone please throw some light on it? 回答1: What are docValues in Solr ? Doc values can be explained as Lucene's column-stride field value storage or simply its an uninverted index or forward index. To illustrate with json: row-oriented (stored fields) { 'doc1': {'A':1, 'B':2, 'C':3}, 'doc2': {'A':2, 'B

Solr/Lucene is ignoring proximity search when grouped with a nested query

拟墨画扇 提交于 2019-12-12 10:27:04
问题 I'm encountering some confusing behaviour with solr queries (technically the Lucene parsing) which can be simplified down to a query like the following: _query_:"foo:\"a b\"~3" AND foo:"c d"~6 Using the debugQuery option I can see this is parsed as: +PhraseQuery(foo:\"a b\"~3) +PhraseQuery(foo:\"c d\") or as parsedquery_toString, +foo:\"a b\"~3 +foo:\"c d\" What has happened to the proximity of ~6 from the right hand side of the query? This only appears to happen when combining a nested query

ExternalFileField in Solr 3.6

删除回忆录丶 提交于 2019-12-12 10:17:31
问题 I am trying to use Solr 3.6.1 ExternalFileField . Here is my fieldtype definition: <fieldtype name="file" keyField="id" defVal="0" stored="true" indexed="true" class="solr.ExternalFileField" valType="float"/> and here is the field definition: <field name="fviews" type="file"/> I was able to test it by sorting on fviews like http://localhost:8983/solr/select?q=tag_id:1&sort={!func}fviews desc and it is working correctly. But I am running into two issues: I need this field back in my search

How to retrieve “facet_queries” data with SolrJ

爷,独闯天下 提交于 2019-12-12 09:57:21
问题 I did not find any way to do that. Is it possible? Thanks 回答1: You can retrieve facet queries using the getFacetQuery() method and you can append facet queries to a solr query using the addFacetQuery() method. The following example test provided with Solr has some good examples of using facet queries with SolrJ: SolrExampleTests.java 来源: https://stackoverflow.com/questions/1299732/how-to-retrieve-facet-queries-data-with-solrj

Solr field collapsing

为君一笑 提交于 2019-12-12 09:11:48
问题 I read http://wiki.apache.org/solr/FieldCollapsing and I tried the query http://192.168.0.1:8080/solr/append/select?q=mobile&group=true&group.field=brand and I don't see the field collapsing. I mean I see the results, but not the grouping. My understanding is it should work, nothing to change in the solrconfig.xml ? In my schema, all my field are stored/index. My index is Lucene 2.9 and my Solr is 1.4.1. I don't see what I doing wrong... 回答1: Field collapsing is not available in Solr 1.4.1.

How to read data from solr/data/index

时光怂恿深爱的人放手 提交于 2019-12-12 08:59:07
问题 How to read data from solr/data/index by some simple console Java application? I found some solution. But maybe there is more simple way. Help please with that, I really don't know what to do. 回答1: It's my own solution. I get index files from solr 4.4 and I also use lucene-core-4.4.0.jar library. Maybe it can help someone. import java.io.File; import java.io.FileWriter; import java.io.IOException; import org.apache.lucene.document.Document; import org.apache.lucene.index.IndexReader; import

Solr: How to search multiple fields

两盒软妹~` 提交于 2019-12-12 08:58:28
问题 I am using solrnet. I have a title and Description fields. I need to search both fields simultaneously. How do I do this? 回答1: Jayendra's answer is correct, but if you want to do this without aggregating data in a single field at index-time (copyFields) and want to do it at query-time instead using the standard handler instead of dismax, in SolrNet you can do: var query = Query.Field("title").Is(mytitle) || Query.Field("Description").Is(mydescription); var results = solr.Query(query); See