sphinx

Sphinx returning bad search results

I am using Sphinx with the Thinking Sphinx plugin. I have indexed a model called Venue with the following code (and the rake thinking_sphinx:index command) define_index do indexes :name indexes city indexes zip end I obtain the results in my controller with this code: @venues = Venue.search params[:search] and I render...

Sphinx, Rails, ThinkSphinx and making some words matter more than others in your query.

I have a list of keywords that I need to search against, using ThinkingSphinx Some of them being more important than others, i need to find a way to weight those words. So far, the only solution i came up with is to repeat x number of times the same word in my query to increase its relevance. Eg: 3 keywords, each of them having a level ...

Using sphinx/miktex to generate pdf files that displays UTF8 Japanese (CJK) text in windows

I have documentation in ReSt (UTF8) and I'm using sphinx to generate HTML and latex files. (No issues with html conversion) I then want to convert the resulting latex file to PDf. Currently I'm using MiKTeX 2.7's pdflatex.exe command to perfom this conversion. (Converting a source file without Japanese characters produces the expected...

How do I start the sphinx daemon automatically when my rails application loads?

I am aware of the command to start the sphinx daemon manually. I use a rake task: "rake thinking_sphinx:start" Is it possible to have it start whenever my rails application loads so I don't have to manually type in the command every time? ...

Thinking Sphinx - RuntimeError: Missing Attribute for Foreign Key ...

Trying to get along with Sphinx/Thinking Sphinx for the first time. I've got my models defined as follows (simplified): class Branch < ActiveRecord::Base has_many :salesmen, :class_name => "User" has_many :leads, :through => :salesmen end class User < ActiveRecord::Base belongs_to :branch has_many :leads, :foreign_key => "ow...

ThinkingSphinx not accepting conditions

I'm having trouble getting ThinkingSphinx to recognize my conditions. My Discussion model includes the following code: define_index do indexes [subject, body], :as => :text indexes replies.body, :as => :reply_text set_property :delta => true end And as expected this search Discussion.search "handy" returns any discussion wit...

Sphinx automated image numbering/captions?

Is there a way to automatically generate an image/figure caption using sphinx? I currently have rest-sphinx files I'm converting to html and (latex)pdf using sphinx. I'd like an easy way for users to reference a specific image in the resulting html/pdf files. For example, if a user is refering to the documentation in an email, "In 'Ima...

How do I search over multiple models in a CMS using Sphinx?

I'm attempting to using Sphinx in my CMS as a sitewide search. Since each model in the CMS has different fulltext fields, I've created an index per model. However, according to Sphinx's forum, searching over multiple indexes with different schema is not supported. How are you CMS guys using Sphinx for your general site search? Perfor...

Has anyone used Sphinx to document a C++ project?

Sphinx is a new documentation tool for Python. It looks very nice. What I'm wondering is: How suitable this is for documenting a C++ project? Are there any tools for converting existing documentation (e.g. doxygen) to Sphinx format? Are there online/downloadable examples of C++ projects that use Sphinx? Any tips from anyone who has use...

How do you return a specific field from Sphinx results?

Assume I'm indexing a table of books. They have title, author, description, etc. I want to do a search across all fields and return the title of the books that contain my search term. I can do a search and return the book_id (doc_id) from Sphinx so I can look them up myself, but what would be really awesome is if Sphinx just gave me the...

Do you know a way to generate Microsoft Word documents using Sphinx?

Sphinx supports a few output formats: HTML separated files (with html or dirhtml) Latex which is useful for creating .pdf or .ps text Instead I would like to obtain a Microsoft Word file. With other doc generator I managed generating the single html output and then converting it to the Microsoft Word format using the Word applicatio...

Sphinx Filters - Can I have an 'OR' between filters attributes?

I'm using sphinx to list me some items from my database here. It's almost 100%, I just haven't figured out yet how to create an OR between two different filters. For example: My Object in the database has a starting and an ending date, I can filter(starting_date, x, y) and filter(ending_date,x,y), but both filters will have to return tr...

Searching and sorting by a float field with thinking sphinx

I'm using thinking sphinx to for search on a rails app. I have a float field called 'height'. I need to be able to search this field for exact values (i.e. exactly 6.0, not 6.5). I also need to be able to sort on the field. What I have so far: indexes height, :sortable => true Problem: doesn't sort properly, returns 6.0 and 6.5...

php mysql fulltext search: lucene, sphinx, or ?

This is admittedly similar to (but not a duplicate of) http://stackoverflow.com/questions/737275/pros-cons-of-full-text-search-engine-lucene-sphinx-postgresql-full-text-search, however what I am looking for are specific, supported, recommendations from the benefit of experience with more than one of the available systems (there seems to ...

Full Text Search with Firebird and Delphi

I'm looking into implementing full text search on our Firebird database. Our requirements are: Every field in several tables should be indexed. When a result is found we should be able to find out the originating table. The index can be stored in the database or in the file system. The results of the search (BigInt primary keys) must b...

Specifying Different Column as DOC ID using Thinking Sphinx

I am using the great Thinking Sphinx plugin for accessing Sphinx Search in RoR 2.2.3. I have a cache table that stores pre-compiled views. This is the source data table for Sphinx. However, the ID column on this table is basically garbage, and the ID that I want is stored in another column (cacheable_id). How can I setup Thinking Sphin...

Sphinx ordering: nil/NULL values last

On a Rails project, I'm using Sphinx together with Thinking Sphinx plugin. I index a table with an attribute :foo that is a float. My desired behaviour when sorting for column :foo would be that nil values always appear at the end of the list, e.g. id; foo (order foo desc) ------- 1; 5 2; 3 3; -4 4: -5 5: nil 6: nil id; foo (order f...

Accent Insensitive ordering in Sphinx

I am using Sphinx with the Thinking Sphinx plugin to search my data. I am using MySQL. My data contains accented chars ("á", "é", "ã") and I want them to be equivalent to their non-accented counterparts ("a", "e", "a", for example) when searching and ordering. I got the search working using a charset table (pastie.org/204316), and a se...

how much more performant is sphinx than MySQL default fulltext search?

MySQL's default fulltext search sucks when the data volume is big. So I'm counting on sphinx to get rid of the trouble. Is there a benchmark data available that compares these two kinds of searches? ...

Sphinx templating

I am using sphinx. I want to template it. So after reading the docs, what I am trying is, in my conf.py, I put a line like, templates_path = ['_templates'] and I created a file _templates/page.html But this does not override the default template provided by sphinx. What more should I do, and where does this template need to go? ...