spot7.org logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
  Home » SOLR » Page 1
Using PreparedStatement with solr_query in DataStax Enterprise
Sorry, but CQL does not support variable substitution within string constants, only for a complete string constant. The Solr query string is parsed again on every SELECT statement execution anyway, so having the Solr query string "prepared" would save no overhead, so you should simply supply the entire Solr query string as a prepared statement variable, as in "WHERE solr_query = ?".

Categories : Solr

Solr: Exact match for field value
In 4.x and trunk the default value of mm is dictated by the q.op param (q.op=AND => mm=100%; q.op=OR => mm=0%). Keep in mind the default operator is effected by your schema.xml entry. In older versions of Solr the default value is 100% (all clauses must match) Did you use this syntax in your query ? your_domain:8983/solr/select/?q=banana+republic&defType=dismax&q.op=AND&... OR yo

Categories : Solr

How to query Solr shard
You can't just copy the content from the response into your configuration file - those two formats are completely different. The reference is to the fact that each entry in the defaults section is added to the query string (unless they're provided there already - there are also options if you want to force a certain value that can't be overridden). <requestHandler name="/selectdistributed" cla

Categories : Solr

Solr search used method queryForFacetPage only 10 records return
I'm guessing you're using the Spring Data Solr-framework from your method names. Here you can set the facet.limit option through setFacetLimit, which defaults to 10. This sets the number of terms returned for each facet. You can set the value to a negative value to return all terms, but if you need a certain amount of terms - use a specific value instead so Lucene can shortcut the facet building i

Categories : Solr

Number of shards in Solr
If your index size is nothing more than 10GB and all the shards would be living on one single server, there isn't much reason to consider sharding at this time. It will probably not give you much either way. If you're planning on adding more servers later, you can distribute your index at that time - when you have an idea of what kind of resources you'll have available. You probably want to look i

Categories : Solr

How to use will_paginate with Sunspot Solr
I found the answer. Instead of using @search.results within the "will_paginate" method in the view, I needed to use @search.hits. using "hits" is key. "results" only returns the quantity of results from the paginated aspect in the model.search method. "hits", on the other hand, provides an array of records that reflects the quantity of the entire search, therefore allowing the paginated results

Categories : Solr

SOLR exact and partial match
Most of your example seem to require no tokenization and just an NGram filter, so the input matches any valid prefix of your indexed text. This does not address why 50 should match however, it seems to be right in the middle of the string. Also, it's not clear what should happen with M-1 in the second example, is it supposed to match by M-1 or just 1 or something else. So, you may need to clari

Categories : Solr

Facet groups in Solr - is this possible in one query
This can implemented using tagged filters and then excluding them when creating the facet. From the referenced page: To implement a multi-select facet for doctype, a GUI may want to still display the other doctype values and their associated counts, as if the doctype:pdf constraint had not yet been applied. Example: === Document Type === [ ] Word (42) [x] PDF (96) [ ] Excel(11) [ ]

Categories : Solr

Solr Filter query with NOT an AND operator
Hopefully this isn't obsolete in Solr 4.x, but your problem may be in thinking that NOT can be a unary operator. From the Lucene/Solr 3.5 docs: Note: The NOT operator cannot be used with just one term. For example, the following search will return no results: NOT "jakarta apache" You might be able to express the same thing by taking advantage of the fact that *:* will return

Categories : Solr

DSE Solr: Netty errors during concurrent query requests
Seems to be a Netty/JVM bug, related to: https://github.com/netty/netty/issues/1765. Could you try another OS and/or JVM version?

Categories : Solr

Solr 4.10.2 Encoding
As you say, you're using windows-1252 as the encoding, and the submitted data is in windows-1252. You'll have to convert it to UTF-8 (through iconv, for example: iconv("cp1252", "utf-8", $text)) before querying or inserting it into Solr. The encoding of your source files won't affect the encoding of the data in your application, and unless you're working with UTF-8 when interfacing with Solr, you

Categories : Solr

How to boost a solr document at query time based on attribute value
You don't need to use the boost with a dynamic boost. Apply a boost query which will boost all the documents that match the query: bq=user_id:2^4. Adjust 4 to a suitable boost value depending on the rest of your boosts (if any in q or qf).

Categories : Solr

Identifying documents by multiple unique keys in solr
You could prevent duplicates from entering the index by using the "De-duplication" Solr feature. Please have a look at the wiki for configuration and more details: https://cwiki.apache.org/confluence/display/solr/De-Duplication There is a also a flag "overwriteDupes" that I believe issues an "update" command that overrides the old values, although it is not clearly documented in the wiki.

Categories : Solr

SOLR Multivalue - set custom "space" between lines
Use the positionIncrementGap setting on your field to set the distance between each token in a multivalued field. <fieldType name="someMultiValueFieldType" class="solr.TextField" positionIncrementGap="20">

Categories : Solr

how to create your own custom ngram filter in solr
Depending on your need you can either develop a new filter from scratch, or you can start from the existing NGramFilter and modify it to suit your needs. The existing NGram and Shingle filters should however be able to do most of what is considered NGrams.

Categories : Solr

Why Inverted Indexing is not suitable for SOLR Sorting /Faceting
The reason is that it's expensive to compute the count of documents actually containing the facets. For each term you're practically doing a search for that term and intersecting it with the set of documents that you've already retrieved, finding out how many documents is contained in both the previous and the new set. The inverted index doesn't provide anything (directly) useful to do this. Ther

Categories : Solr

How to do proximity search between phrases in SOLR?
If you don't mind being a bit looser on your matching, you could always just do this: "X M Z K"~10. That would match what you want. It would, however, also match some other things like: "X A A M Z A A A K". If you can tolerate that, then there is the easy answer. You might also look into the edismax query parser's pf2 and ps2 parameters, see if those are something you can use to get close enou

Categories : Solr

Solrj random sorting
I dont think solr will return you with a single query for your needs, you want 100 most expensive ( This itself is based on criteria ) and then a last record with random product. As per my knowledge, you will have to use 2 queries to get the results out. before this you have to include a random field sort in your solr.xml as illustrated below : Use a RandomSortField in your solr.xml . There's an

Categories : Solr


Recently Add
Solr - Index informations merging from different data sources
Using PreparedStatement with solr_query in DataStax Enterprise
Solr: Exact match for field value
How to query Solr shard
Solr search used method queryForFacetPage only 10 records return
Number of shards in Solr
How to use will_paginate with Sunspot Solr
SOLR exact and partial match
Facet groups in Solr - is this possible in one query
Solr Filter query with NOT an AND operator
DSE Solr: Netty errors during concurrent query requests
Solr 4.10.2 Encoding
How to boost a solr document at query time based on attribute value
Identifying documents by multiple unique keys in solr
SOLR Multivalue - set custom "space" between lines
how to create your own custom ngram filter in solr
Why Inverted Indexing is not suitable for SOLR Sorting /Faceting
How to do proximity search between phrases in SOLR?
Solrj random sorting
© Copyright 2017 spot7.org Publishing Limited. All rights reserved.