solr

How to get query time from a Sunspot Search

I've implemented Sunspot to do searching on a Rails App. Is there any way to get the time the query took to execute? Eg. 10 records returned in 0.5 seconds I've been searching around the sunspot docs, but i can't seem to find out if they support this or not. ...

Do you need Solr/Lucene for MongoDB, CouchDB and Cassandra?

If you have RDBMS you probably have to use Solr to index your relational tables to fully nested documents. Im new to non-sql databases like Mongodb, CouchDB and Cassandra, but it seems to me that the data you save is already in that document structure like the documents saved in Solr/Lucene. Does this mean that you don't have to use So...

Possible to have multiple query elevation file?

I face a problem when using QueryElevation. I want to split the elevation file into several files, and be able to manage differently according to different domain (I have several domains to manage). Each domain belongs to the same application. How could I manage each elevation file differently? ...

Changing params for search with rails and sunspot

This seems like a common task, I'm sure others have come across it. If my controller says this : def index s = Sunspot.search Organization do |query| query.keywords params[:q] unless params[:q].blank? query.with(:searchable).equal_to(params[:filter_by] == 'published' ? 'true' : false) if params[:filter_by] .. How do I: ....

Can we tell Solr/Lucene max chars to analyze for a search?

Hi I have a problem that in my lucene index files one document can have huge text. now when i search one of these huge text documents lucene/solr does not filter any results even the search term exist in the document text. the reason that i think might be the large number of characters in document text? if yes than how could we tell sol...

Solr Mulivalued Problem

Consider The following is the json response i'm getting from the solr if i use multivalued = true for the fields. { "id":["1","2","3"], "TS":["2010-06-28 00:00:00.0","2010-06-28 00:00:00.0","2010-06-28 00:00:00.0"], "Type":["VIDEO","IMAGE","VIDEO"] } but i need the response like this { "0":["1","2010-06-2...

C#, multicore solr, Lucene, shards, case insensitive "contains" searching, and one giant migraine.

I am having one heck of a time with my implementation. We have a solr server running. We have 3 cores, and for simplicty let's call them "Members", "Businesses", and "Products" I was attempting to use solrnet, but it does not support sharding. So, I am dreading that I will have to build the url myself. So, I used the admin tool to bu...

Example of a Solr plugin written in Clojure

Hi, have anyone seen a Solr plugin example written in Clojure? I guess it should be straight forward, but I would appreciate a simple example before I started working on one specific plugin. Thanks. ...

lucene vs solr scoring

Can some one explain (or quote a reference) to compare the scoring mechanism used by SOLR and LUCENE in simpler words. Is there any difference in them; I am not that good at solr/lucene but my finding showed as if they are different. P.S: i just tries a simple query like "+Contents:risk" and didn't use any filter other stuff. ...

how to get exact search result on top in solr 1.3?

I am using Solr 1.3.This is the schema.xml of Solr 1.3. (http://pastebin.com/NwEy9Kz6). If i search for 'Hero' (e.g. +movieName:"Hero"), the Top most search document which contain the word "Hero", not the exact matching "Hero" document. e.g. Heroes, The Hero, Hero Hiralal, Heroes 2, Herold, Hero. I want the exact match word appear on t...

How do I get a Solr ResourceLoader from a SolrServer?

Hi, My application uses solrj. I have a reference to a SolrServer object. The SolrServer object was created by instantiating a new CommonsHttpSolrServer object with the URL to my Solr server as the constructor argument. I now need a reference to a class called a ResourceLoader. I can't figure out how to get it. I know that a SolrCore o...

Returning distance and Searching by radius in Solr 1.5

Does anyone know of a means of returning the distance in the result set using Solr 1.5? An example of the function we're using is: dist(2, store, vector(43.517030,-96.789603)) where "store" is a LatLon field containing both latitude and longitude of each item in the index. Can you give an example URL that would return a distance field ...

solrindex way of mapping nutch schema to solr

Hi, We have several custom nutch fields that the crawler picks up and indexes. Transferring this to solr via solrindex (using the mapping file) works fine. The log shows everything is fine, however the index in solr environment does not reflect this. Any help will be much appreciated, Thanks, Ashok ...

ERROR:unknown field '..'

Hello, qorking on Solr, I get this error: ERROR:unknown field 'name' But I have defined this field in my schema.xml : <field name="name" type="string" indexed="false" stored="true" required="true" elementForm="INPUTHIDDEN" /> I get this error when I try to add the field to the documment which is going to be commited: doc.addField...

Solr Minimum Match not working?

In my solrconfig.xml I specify a mm of 100% yet, searches with multiple terms, still show results that only match some of the search terms. If I explicitly put a + in front of each term, the desired behavior is achieved, but for obvious reasons, I don't want the user to have to enter the +'s. Also, I have tried several variations of the...

How to backup a Solr database to a file?

I have very little information about this, and there isn't much on the web. Does any experienced know how to dump the solr database (index) to a file. I have a Virtual Private Server, where all files are backed up automatically by the provider of the VPS at midnight every day. So, I need to export the Solr index to a file. And IF some...

solr: multiply score with a field

Hopefully an easy question: I have added some docs to the index, where every doc has a field prio, which is an integer between 1 and 5. There is also a text field for fulltext search. What I want: multiply the prio-value with the score value and order the docs by that result. what I tried: this and that :) last thing was q=whatever _va...

Can the defaultSearchField in a Solr schema be set to "any or all" fields?

There is a parameter in the Solr schema to set a default search field like so... <!-- field for the QueryParser to use when an explicit fieldname is absent --> <defaultSearchField>detail</defaultSearchField> ...But I would like to search all fields (I have five besides "detail") when the user does not specify. How can I make search a...

How to search a complete document in Lucene via Solr?

I have a question regarding searching a complete document. 1 - I have indexed a lot of documents on lucene. 2 - Each document has a single word per line. Suppose 200 words which becomes 200 lines. 3 - I know how to search lucene via Solr but; If suppose that i indexed the document mydoc.txt on lucene containing 200 words along with o...

Error while connecting to a remote solr instance from Sunspot

I am using Sunspot rails(1.1.0). Everything works when I run my Rails application and the Solr server on the same machine. When I run Solr server on a different machine, I get the following error: Errno::ECONNREFUSED: Connection refused - Connection refused from /opt/tibco/jruby-1.4.0RC1/lib/ruby/1.8/net/http.rb:560:in `initialize' from...