solr

Filtering solr facet counts

Given the following scenario: <field name="product_id" type="text" indexed="true" stored="true" multivalued="true"/> <field name="product_type" type="text" indexed="true" stored="true" multivalued="true"/> i want to get facet counts for the facet field product_id filtered by specific product_type given a resultset (to get this i use f...

Does solr make faceting on empty String?

Last time I made a solr index, it started indexing and doing faceting on empty strings too. This never happened. It is the right behaviour? Should I filter empty strings in the DIH? Thanks. ...

No Search Results

I installed apache solr on drupal 5, now when I perform a search using Admin I get results but I do not get any from Drupal. ...

Testing Solr via Embedded Server

Hallo everybody, i'm coding some tests for my solr-indexer application. Following testing best practices, i want to write codes self-dependant, just loading the schema.xml-solrconfig.xml config i want and creating a temporal data tree for the indexing-searching tests. As the application is most written in java, i'm dealing with SolrJ lib...

Django haystack and whoosh

Does anyone have any experience using django-haystack with the whoosh backend? I'm looking to use it for a categorized live-search type tool. Is it gonna be fast/efficient enough in a production environment to avoid setting up either solr or xapian? ...

Solr Query Syntax

Hi all, I just got started looking at using Solr as my search web service. I don't know whether Solr supports these query types: Startswith Exact Match Contain Doesn't Contain In the range Could anyone guide me how to implement those features in Solr? Cheers, Samnang ...

how to search all / wildcard in lucern solr

I'm using RoR + acts_as_solr to query a Solr database. I'm used to using "*" to select all, thanks to MySQL, but that command fires an exception in Solr. Are they other wildcards I can use? Suggestions? Thanks! ...

solr query with ruby - need to compare date time

My Lucene/Solr database contains a date column (created_at) that I need to use as a condition in a query. I'm new to RoR and assume that RoR automatically uses its own date object upon anyObject.save, and that Solr in turn reindexes that column in its own way. Regardless, the date is in this format: "2008-06-03 11:15:20" I can write ...

how to customise search results of apachesolr (drupal 6)

can somebody help me how to customize the search result of a apache solr search. i was only able to access these variables [comment_count] => [created] => [id] => [name] => [nid] => [title] => [type] => [uid] => [url] => [score] => [body]. how can i access other variable like status, vote .... from the index ( i don't want to access the...

Using solr for indexing different types of data

Hi. I'm considering the use of Apache solr for indexing data in a new project. The data is made of different, independent types, which means there are for example botanicals animals cars computers to index. Should I be using different indexes for each of the types or does it make more sense to use only one index? How does using ...

Solr: Populate Separate Fields from a Tokenizer

I've created a custom Tokenizer in Solr that looks for named entities. I would like to be able to use this information to populate separate fields within the lucene/solr document. As an example, I want to populate a multivalued field called, "locations" with all the location names that were extracted from the text. To extract location...

Solr Query on Unique Integer Field

I have a field defined in schema.xml as: <field name="id" type="integer" indexed="true" stored="true" required="true" /> It is also the uniqueKey for the schema. I cannot perform a query on this field with the query url: /select?q=4525&qf=id&fl=id,name%2Cscore This returns no results, however, if I search on a different field(such...

Schema considerations when moving from an RDBMS (MySQL) to Solr

Whilst testing a Solr install for a future MySQL -> Solr migration, it's immediately apparent that the "rules" for what constitutes a good data stucture, and by extension an efficient search, are very different in Solr when compared to an RDBMS like MySQL. The most obvious thing being that data isn't (or doesn't seem to be) normalised to...

How to implement Solr or SolrJ bound query ?

I want to use a query like: sql(select name where id > 10 and id < 100 ) by using Solr or in SolrJ, but do not know how to implement? Can someone explain? ...

Question about Solr and SolrJ range query ?

Hi all: Suppose that my index has 3 fields: title, x and y. I know one range(10 < x < 100) can query like this: http://localhost:8983/solr/select?q=x:[10 TO 100]&fl=title If I want to two range(10 < x <100 AND 20 < y < 300) query like SQL(select title where x>10 and x < 100 and y > 20 and y < 300) by using Solr range query or So...

Term extraction: Generatings tags out of text

How to get the same results as http://developer.yahoo.com/search/content/V1/termExtraction.html This question has been asked quite a few times before. http://stackoverflow.com/questions/1078766/best-approach-to-analyze-text-in-php http://stackoverflow.com/questions/711062/what-is-a-good-keyword-extraction-web-service http://stackoverf...

How to match search strings to content in python

Usually when we search, we have a list of stories, we provide a search string, and expect back a list of results where the given search strings matches the story. What i am looking to do, is the opposite. Give a list of search strings, and one story and find out which search strings match to that story. Now this could be done with re b...

Localized search with rails using acts_as_solr

I've a Rails 2.3 site with versions both in spanish and english, I am using translated_model. I am using acts_as_solr for full text search using multi_solr_search to return results from various models. I need to the search feature available both in spanish and english, how can I restrict the search to certain fields depending on the I1...

A question about SolrJ range query?

We can use solr range query like: http://localhost:8983/solr/select?q=queryStr&amp;fq=x:[10 TO 100] AND y:[20 TO 300] or : http://localhost:8983/solr/select?q=queryStr&amp;fq=x:[10 TO 100]&fq=y:[20 TO 300] How to make this range query by using solrJ ? ...

solr sanitizing query

I am using solr with ruby on rails. It's all working well, I just need to know if there's any existing code to sanitize user input, like a query starting with ? or * ...