solr

solr responses to webbrowser URL but not from javascript code?

I have set up Solr and it's working because I can see the search results when I'm typing: http://localhost:8983/solr/select?q=*:* in the browser. However, it doesn't work when I try to contact it through ajax-javascript/jquery. I've tried with $.get, $.post and with the ajax-solr code: var Manager; (function ($) { $(function () ...

solr terms: boosting and dismax?

Currently I am learning how SOLR works. Words I usually see are boosting and dismax request handler. What do they mean? I have googled it but found the explanations difficult to understand. I also read that the dismax handler could search multiple document fields. What does that mean? Doesn't the standard search handler search in mult...

search in all fields for multiple values?

i have two fields: title body and i want to search for two words dog OR cat in each of them. i have tried q=*:dog OR cat but it doesnt work. how should i type it? PS. could i enter default search field = ALL fields in schema.xml in someway? ...

Solr PHP client vs file_get_contents?

I am using PHP to access Solr and I wonder one thing. Why should I use Solr PHP client when I can use: $serializedResult = file_get_contents( 'http://localhost:8983/solr/select?q=niklas&wt=phps'); to get the result in arrays and then print them out? I don't really get the difference. Are there any richer fe...

get solr object fields in php?

with solr php client you can get results from solr. if ($results) { $total = (int) $results->response->numFound; $start = min(1, $total); $end = min($limit, $total); echo "Visar: " . $start . " - " . $end . " av " . $total . "<br />"; // iterate result documents foreach ($results->response->docs as $doc) { <<...

how to search in multiple fields with solr php client?

when i do a standard search it just search for one field type. $results = $solr->search($query, $offset, $limit); when i try this: $params = array('qf' => 'threads.title posts.body'); $results = $solr->search($query, $offset, $limit, $params); it still doesnt work. any idea? ...

solr php client search method: use to search word1 OR word2?

i use solr php client. but when i use the search method: $params = array('qf' => 'threads.title posts.body', 'defType' => dismax); $results = $solr->search($query, $offset, $limit, $params); when i use defType = dismax it searches $query = 'Peter Jakob' as the whole string instead of Peter OR Jakob. it works fine when i dont use the...

solr problem to get the field names

Ive got a problem. In each document I've got fields: threads.id and posts.id. I want to get the field name value for them so i can get data from the database. Between the lines beneath i have marked the lines where i want to get the fields. But it returns error because they are $doc is object. How can i get the fields? I have to do i...

solr relational database error

i got 2 tables: threads: id, title posts: id, thread_id, body i want a document to contain the thread and all the posts that belong to it. why doesnt this work: <document> <entity name="threads" query="select id, title from threads"> <field column="title" name="threads.title"/> ...

Dreaded Could not reserve enough space for object heap

Im trying to get Solr up and running, at first I had the JDK.1.6 working fine, then tomcat running fine too. All of a sudden when trying to run Solr for the first time however I get the error message: [root@78 bin]# ./java -version Error occurred during initialization of VM Could not reserve enough space for object heap Could not create...

highlight the matched keywords in the thread bodies in a search with solr?

Ive got the following code. $params = array('defType' => 'dismax', 'qf' => 'threads.title posts.body tags.name', 'hl' => 'true'); $results = $solr->search($query, $offset, $limit, $params); So the keywords will be highlighted. What i dont know how to do is pulling the data out from $results. How do I get a documents field values and ...

field that has to have at least one match in solr?

i´ve got 3 query fields that i´ve set with qf. but i want one of these fields to have at least one match of the query strings. how could i do it in the settings without having to add + manually in the q parameter (cause the user will type the keywords and i want this to be default). ...

Prioritize fields which start with search term using Sphinx (Thinking Sphinx) - or another full-text search engine.

I'm using sphinx and thinking sphinx to search a customer database. The customer metadata (emails, tels etc) are spread across multiple tables and sphinx indexes all notes on customers etc etc. The problem I'm having is that I want text fields which START with the search term to be displayed first in searches. i.e. a search for "hods" sh...

Solr DIH delta-import with compound primary keys?

My Solr data source is a SQL database where the primary key is compound (i.e. it's two fields). This is fine for my main DIH query, I just concatenate the fields and that becomes my Solr primary key. However it's unclear from the documentation how I'd write a delta-import query to support this. The documentation suggests I need two qu...

Django-haystack result filtering using attributes?

Can someone show me an example of how to filter fulltext search results with django-haystack using attributes? I went through the tutorial on their website but am still mot sure on how to use haystack. For instance, let's say I have a class Product: class Product(models.Model): title = models.CharField(max_length=200) descripti...

Apache solr search part of the word

I'm using apache solr search engine for indexing my website database.. I'm using django+http://haystacksearch.org/ So let's say I have document that have word "Chicken" When I search for "chicken" - solr can find this document But When I search "chick" - it does not find anything.. Is there a way to fix this ? ...

Faceting with Solr using "string" fields, "text" fields and "copy" fields

Hi, I have a problem with Solr and Faceting and wondering if anyone knows of the fix. I have a work around for it at the minute, however i really want to work out why my query isn't working. Here is my Schema, simplified to make it easier to follow: <fields> <field name="uniqueid" type="string" indexed="true" required="true"/> ...

Solr ExtractingRequestHandler giving empty content for pdf documents

I am using ExtractingRequestHandler in Solr for getting document content and index it. It works fine for all Microsoft Documents, but for PDFs, the content being extracted is empty. I have also tried the extractOnly=true with curl, and that also returns just the empty body. I have used TIKA independently on the same documents and that e...

Digg-like search result ranking with Lucene / Solr ?

I'm using Solr for search. I have documents that have an integer field "popularity". I want to rank results by a combination of normal fulltext search relevance and popularity. It's kinda like search in digg - result ranking is based on the search relevance as well as how many digs a posting has. I don't have any specific ranking a...

How to filter results based on order in Solr?

I need to facet inside n documents which are selected like ... ORDER BY something DESC LIMIT 100 Is that possible with Solr? How? ...