Hi Logan,
min_infix_len and min_prefix_len are index-specific settings, not
field-specific. So, you should be able to set them in the index definition:
indexes title, :infixes => true
indexes notes, :prefixes => true
set_property :min_infix_len => 3, :min_prefix_len => 3
Does that do what you need it to?
—
Pat
> On 30 Aug 2017, at 9:53 am, Loganathan Sellappa <[email protected]
> <mailto:[email protected]>> wrote:
>
> 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 => :boolean
> end
>
> 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
>> <http://gmail.com/>> 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 <http://googlegroups.com/>.
>> To post to this group, send email to thinkin...@ <>googlegroups.
>> <http://googlegroups.com/>com <http://googlegroups.com/>.
>> Visit this group at https://groups.google.com/group/thinking-sphinx
>> <https://groups.google.com/group/thinking-sphinx>.
>> For more options, visit https://groups.google.com/d/optout
>> <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 [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/thinking-sphinx
> <https://groups.google.com/group/thinking-sphinx>.
> For more options, visit https://groups.google.com/d/optout
> <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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/d/optout.