Search should be "like '%keyword%' based or thesaurus

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Search should be "like '%keyword%' based or thesaurus

Deepak Agarwal-2
Hi All,

Our testing shows that if we use mysql 'like' to search over the keywords
the results takes much time due to database overhead. We are planning to
make a good list of thesaurus and use '=' operator to search over in
'where' clause.

Looking for your thoughts. Is it a good idea? or if you could share your
experience in ofbiz search system.

--
Thanks,
Deepak Agarwal,
Reply | Threaded
Open this post in threaded view
|

Re: Search should be "like '%keyword%' based or thesaurus

Robert Gan
is it for ecommerce application?

--> use solr
(fast, flexible, dream :) )
Reply | Threaded
Open this post in threaded view
|

Re: Search should be "like '%keyword%' based or thesaurus

Deepak Agarwal-2
Yes. ecommerce. and unfortunately I can not go for SOLR immediately and I
need to make sure that current search of ofbiz works for me.

However, I am still curious to know feedback about solr and how to
implement that (bigfish we can use if required)

On Fri, Jul 27, 2012 at 4:57 PM, Robert G. <[hidden email]> wrote:

> is it for ecommerce application?
>
> --> use solr
> (fast, flexible, dream :) )
>
>
>
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/Search-should-be-like-keyword-based-or-thesaurus-tp4635304p4635305.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
> --
> Thanks,
> Deepak Agarwal,
>
> Paxcel Technologies Pvt Ltd.
> Hartron Complex, Sector 18, Gurgaon, India.
> E-Mail: [hidden email]
> Mobile: +91 9910322604
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Search should be "like '%keyword%' based or thesaurus

Robert Gan
This post was updated on .
I just can support you with information about solr integration and use...I did it and it was rel. easy and is really, really powerfull..

1. integrate into ofbiz as standalone application
https://docs.google.com/viewer?a=v&q=cache:Ca-IWfMMasQJ:stragure.com/Faceted%2520Searching%2520for%2520Apache%2520Ofbiz%2520E-Commerce.pdf+&hl=de&gl=de&pid=bl&srcid=ADGEEShTAdA9qFkA_gQ_tBDmhoAxIYc2nAHLuReQI9naxM1OeHCiT401OGudiSGYkojx46iVUTg3jU6Iep-Pxi_soeFZTjPqLeupopgHp7YO7Nwd09gTdMN-rpYp8eRO9VMzZcFNbA49&sig=AHIEtbRmQoEU0kXhW-n6M5_6AypYHKmZ5w&pli=1

2. Add the fields to your schema.xml
for the first just take like 2 fields: productID and productName for testing purpose

3. Integrate the jar files from solr for solrj (java api for solr)

4. Write java methods to get needed data from entities (productId and productName) and send to solr for indexing (solrj api)

5. test solr with a query like "q=productId:yourproductId" and check if you get results

--> That is the main thing for integration. After that you can get more data you need from entities and add the corresponding fields to schema.xml

the last thing is just how to handle the results or queries in your ecommerce application. I use for it jquery, ajax and javascript to make direct solr requests without reloading the whole page (for product filter and search-suggest-function)

for details ask here when you did a few steps

btw. the solr cookbook is a really good source for information how to work with solr...