Hi Pat,

I'm getting the below warning message when I follow the steps provided by 
you.

*WARNING: min_prefix_len=0, prefix_fields ignored*

*WARNING: min_infix_len=0, infix_fields ignored*


FYI I want to enable infix indexing for one column of the table and would 
like to use the prefix indexing for rest of the columns in the same table. 
Copied below the code for your reference

ThinkingSphinx::Index.define(:message, DEFAULT_INDEX_OPTIONS) do

      indexes title, :infixes => true, min_infix_length: 3 # Need something 
like this
      indexes notes,, :prefixes => true, min_prefix_length: 3 # Need something 
like this


      has beetil.beetil_tags.id, :as => :tag_ids, :source => :query
      has watches.user_id, :as => :watching_user_ids, :source => :query

      has "customer_viewable_at IS NOT NULL", :as => :customer_viewable, :type 
=> :boolean

       has "0", :as => :assigned_user_id, :type => :integer
       has "0", :as => :closed, :type => :boolean
       has "0", :as => :requires_config_access, :type => :boolean
       has Searchable::BY_ALL_CUSTOMERS, :as => :customer_ids, :type => :integer
       has "1", :as => :published, :type => :booleanend


Regards,
Logan

On Tuesday, 29 August 2017 13:54:44 UTC+5:30, Pat Allan wrote:
>
> Hi Logan,
>
> To do this, you can set it per field in the index definition:
>
>   indexes name, :infixes => true
>   indexes location, :prefixes => true
>
> The dict setting can only be set per-index, so if you want it for specific 
> indices, add this to those index definitions:
>
>   set_property :dict => ‘keywords’
>
> Or for all indices, add it to each environment in your 
> config/thinking_sphinx.yml file:
>
>   development:
>     dict: keywords
>   test:
>     dict: keywords
>   production:
>     dict: keywords
>
> Though at some point, I believe keywords will be (if it isn’t already) the 
> default dict setting.
>
> Cheers,
>
> — 
> Pat
>
> On 29 Aug 2017, at 8:06 am, Loganathan Sellappa <logana...@gmail.com 
> <javascript:>> wrote:
>
> Hello,
>
>
> I want to have infix indexing for few fields and prefix indexing for some 
> other fields in my table. 
>
> Is there a way to do it in sphinx?
>
>
> I'm looking for options infix_fields & prefix_fields in Sphinx with 
> dict=keyword
>
>
> Regards,
> Logan
>
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Thinking Sphinx" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to thinking-sphi...@googlegroups.com <javascript:>.
> To post to this group, send email to thinkin...@googlegroups.com 
> <javascript:>.
> Visit this group at https://groups.google.com/group/thinking-sphinx.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to thinking-sphinx+unsubscr...@googlegroups.com.
To post to this group, send email to thinking-sphinx@googlegroups.com.
Visit this group at https://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/d/optout.

Reply via email to