Hi,

Currently product search matches the keyword with name and description. I
want to add another field 'name_ar' (name arabic) besides name and
description. What I did is following:

Spree::Core::Search::Base.class_eval do

protected

def get_products_conditions_for(base_scope, query)
unless query.blank?
base_scope = base_scope.like_any([:name, :name_ar, :description],query
.split)
end
base_scope
end
end


But it doesn't work.

Thanks

--

Search Discussions

  • Michael Bianco at Jan 28, 2013 at 5:12 pm
    The best way to enhance the default search is to look at extensions which
    integrate with a robust search server, like sphinx or solr. I
    use https://github.com/iloveitaly/spree_sunspot_search.

    - Mike
    On Saturday, January 26, 2013 11:15:29 AM UTC-5, laurens wrote:

    Spree::Core::Search::Base.class_eval do
    I Think this doesn‘t work.

    You can create a subclass of Spree::Core::Search
    and configure your app to use it in your spree.rb initializer

    config.searcher_class = My::CustomSearch

    see
    http://guides.spreecommerce.com/preferences.html#configuration-through-the-spree-initializer


    Am 26.01.2013 um 04:36 schrieb Muhammad Aamir:
    Hi,

    Currently product search matches the keyword with name and description. I
    want to add another field 'name_ar' (name arabic) besides name and
    description. What I did is following:

    Spree::Core::Search::Base.class_eval do

    protected

    def get_products_conditions_for(base_scope, query)
    unless query.blank?
    base_scope = base_scope.like_any([:name, :name_ar,
    :description],query
    .split)
    end
    base_scope
    end
    end


    But it doesn't work.

    Thanks

    --
    --
  • Nate Lowrie at Jan 28, 2013 at 7:06 pm
    I second this suggestion.
    On Monday, January 28, 2013 12:12:20 PM UTC-5, Michael Bianco wrote:

    The best way to enhance the default search is to look at extensions which
    integrate with a robust search server, like sphinx or solr. I use
    https://github.com/iloveitaly/spree_sunspot_search.

    - Mike
    --
    You received this message because you are subscribed to the Google Groups "Spree" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to spree-user+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Randy Terbush at Feb 22, 2013 at 6:30 pm
    Older thread, I realize...

    Do anyone you have either sunspot_search or spree_solr_search
    as referenced in the Spree docs working on 1.3.x?

    I'm finding both projects seem to be very out of date and will not run by
    following the posted directions.
    On Monday, January 28, 2013 12:06:12 PM UTC-7, Nate Lowrie wrote:

    I second this suggestion.
    On Monday, January 28, 2013 12:12:20 PM UTC-5, Michael Bianco wrote:

    The best way to enhance the default search is to look at extensions which
    integrate with a robust search server, like sphinx or solr. I use
    https://github.com/iloveitaly/spree_sunspot_search.

    - Mike
    --
    You received this message because you are subscribed to the Google Groups "Spree" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to spree-user+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Nate Lowrie at Feb 22, 2013 at 7:35 pm
    Randy,

    I am still on 1.2 at the moment. Have you looks at the forks to see if any
    of them are more up to date?

    Regards,

    Nate
    On Friday, February 22, 2013 1:30:30 PM UTC-5, Randy Terbush wrote:

    Older thread, I realize...

    Do anyone you have either sunspot_search or spree_solr_search
    as referenced in the Spree docs working on 1.3.x?

    I'm finding both projects seem to be very out of date and will not run by
    following the posted directions.
    On Monday, January 28, 2013 12:06:12 PM UTC-7, Nate Lowrie wrote:

    I second this suggestion.
    On Monday, January 28, 2013 12:12:20 PM UTC-5, Michael Bianco wrote:

    The best way to enhance the default search is to look at extensions
    which integrate with a robust search server, like sphinx or solr. I use
    https://github.com/iloveitaly/spree_sunspot_search.

    - Mike
    --
    You received this message because you are subscribed to the Google Groups "Spree" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to spree-user+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Michael Bianco at Feb 22, 2013 at 9:34 pm
    I use my fork in a 1.2.x production site and it works great.

    I don't use the price faceting though, so that might not work properly.
    However, lots of other facets are used.

    - Mike
    On Friday, February 22, 2013 2:55:29 PM UTC-5, Randy Terbush wrote:

    Nate, I apparently made a mistake by starting off with the newest/most
    active fork in jbrien. That seems to be completely broken.

    I have backtracked to Michael Bianco's repo and it seems to be working as
    advertised. Might be a bit of a problem in price facets, but it does seem
    to be a significant improvement over basic search.

    Thanks for the follow-up


    --
    Randy


    On Fri, Feb 22, 2013 at 12:34 PM, Nate Lowrie <
    na...@finelineautomation.com <javascript:>> wrote:
    Randy,

    I am still on 1.2 at the moment. Have you looks at the forks to see if
    any of them are more up to date?

    Regards,

    Nate
    On Friday, February 22, 2013 1:30:30 PM UTC-5, Randy Terbush wrote:

    Older thread, I realize...

    Do anyone you have either sunspot_search or spree_solr_search
    as referenced in the Spree docs working on 1.3.x?

    I'm finding both projects seem to be very out of date and will not run
    by following the posted directions.
    On Monday, January 28, 2013 12:06:12 PM UTC-7, Nate Lowrie wrote:

    I second this suggestion.
    On Monday, January 28, 2013 12:12:20 PM UTC-5, Michael Bianco wrote:

    The best way to enhance the default search is to look at extensions
    which integrate with a robust search server, like sphinx or solr. I use
    https://github.com/**iloveitaly/spree_sunspot_**search<https://github.com/iloveitaly/spree_sunspot_search>
    .

    - Mike
    --
    You received this message because you are subscribed to the Google Groups
    "Spree" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to spree-user+...@googlegroups.com <javascript:>.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "Spree" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to spree-user+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Randy at Feb 22, 2013 at 9:54 pm
    I am noticing that with sunspot_search installed that I am seeing fewer
    products in their category taxons. Not sure what is up with that.

    On the topic of compatibility, one thing that I would like to start
    tackling is bringing forward some of the extensions that seem to have
    languished at 1.2 and earlier. Is there any basic doc that could be pointed
    to or pulled together to highlight some of the primary changes needed when
    going from say 1.2 to 1.3 or 1.1 to 1.3?



    --
    Randy


    On Fri, Feb 22, 2013 at 2:34 PM, Michael Bianco
    wrote:
    I use my fork in a 1.2.x production site and it works great.

    I don't use the price faceting though, so that might not work properly.
    However, lots of other facets are used.

    - Mike

    On Friday, February 22, 2013 2:55:29 PM UTC-5, Randy Terbush wrote:

    Nate, I apparently made a mistake by starting off with the newest/most
    active fork in jbrien. That seems to be completely broken.

    I have backtracked to Michael Bianco's repo and it seems to be working as
    advertised. Might be a bit of a problem in price facets, but it does seem
    to be a significant improvement over basic search.

    Thanks for the follow-up


    --
    Randy


    On Fri, Feb 22, 2013 at 12:34 PM, Nate Lowrie <
    na...@finelineautomation.com> wrote:
    Randy,

    I am still on 1.2 at the moment. Have you looks at the forks to see if
    any of them are more up to date?

    Regards,

    Nate
    On Friday, February 22, 2013 1:30:30 PM UTC-5, Randy Terbush wrote:

    Older thread, I realize...

    Do anyone you have either sunspot_search or spree_solr_search
    as referenced in the Spree docs working on 1.3.x?

    I'm finding both projects seem to be very out of date and will not run
    by following the posted directions.
    On Monday, January 28, 2013 12:06:12 PM UTC-7, Nate Lowrie wrote:

    I second this suggestion.
    On Monday, January 28, 2013 12:12:20 PM UTC-5, Michael Bianco wrote:

    The best way to enhance the default search is to look at extensions
    which integrate with a robust search server, like sphinx or solr. I use
    https://github.com/**iloveit**aly/spree_sunspot_**search<https://github.com/iloveitaly/spree_sunspot_search>
    .

    - Mike
    --
    You received this message because you are subscribed to the Google
    Groups "Spree" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to spree-user+...@**googlegroups.com.

    For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
    .

    --
    You received this message because you are subscribed to the Google Groups
    "Spree" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to spree-user+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "Spree" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to spree-user+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupspree-user @
categoriesrubyonrails
postedJan 26, '13 at 3:36a
activeFeb 22, '13 at 9:54p
posts7
users4
websitespreecommerce.com
irc#RubyOnRails

People

Translate

site design / logo © 2022 Grokbase