I set up the search generator, made one of my models searchable, and ran the indexer. When I perform a search, nearly all the items show up for many queries. For example, the word ''caramel'' appears in only three items in the db, yet there are a couple hundred results for it when I search for it. What''s going on with this? Are there any alternatives to the search_generator that I can use that work better? Or a way that I can make this work better? I understand it won''t be perfect, but when it returns hundreds of results for a keyword that appears in just a few db records, there''s a problem.
Pat, I''ve had no problems with the search generator - but one thing that is confusing is that the default layout contains a list of the index. So beneath your search results will be a list of all items in the index, which makes it appear as if a ton of results were returned. That''s probably not it - but just wanted to throw it out there. - Derek On 5/11/05, Pat Maddox <pergesu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I set up the search generator, made one of my models searchable, and > ran the indexer. When I perform a search, nearly all the items show > up for many queries. For example, the word ''caramel'' appears in only > three items in the db, yet there are a couple hundred results for it > when I search for it. What''s going on with this? > > Are there any alternatives to the search_generator that I can use that > work better? Or a way that I can make this work better? I understand > it won''t be perfect, but when it returns hundreds of results for a > keyword that appears in just a few db records, there''s a problem. > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Derek Haynes VIPDiner.com | CEO Cell - 404.593.4879
I don''t think so, I changed the layout to use the same one as the rest of the site. And when I search for certain things, it only returns a couple results. ''caramel'' was just a term I entered because I was sure I''d only get a few results back. If you wouldn''t mind (or anyone, for that matter), please take a look at www.hempheadhair.com when you''ve got some time, try the search, and let me know if I''m just being boneheaded. Thanks for the reply On 5/11/05, Derek Haynes <derek.haynes-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Pat, > > I''ve had no problems with the search generator - but one thing that is > confusing is that the default layout contains a list of the index. > > So beneath your search results will be a list of all items in the > index, which makes it appear as if a ton of results were returned. > > That''s probably not it - but just wanted to throw it out there. > > - Derek > > On 5/11/05, Pat Maddox <pergesu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I set up the search generator, made one of my models searchable, and > > ran the indexer. When I perform a search, nearly all the items show > > up for many queries. For example, the word ''caramel'' appears in only > > three items in the db, yet there are a couple hundred results for it > > when I search for it. What''s going on with this? > > > > Are there any alternatives to the search_generator that I can use that > > work better? Or a way that I can make this work better? I understand > > it won''t be perfect, but when it returns hundreds of results for a > > keyword that appears in just a few db records, there''s a problem. > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > -- > Derek Haynes > VIPDiner.com | CEO > Cell - 404.593.4879 >
It looks to me as if it is having the same problem that occurs when the SimpleSearch cannot find a result, it returns all the results. I still haven''t had time to investigate why this happens, but its a known issue (to me at least). If you go to your search page and type in ''xyzzy'' or something else that does not exist you''ll get the same result. But since you say ''caramel'' is in one of the search fields, I''m not sure what is going on. I did the same with ''cruchiness'' which seems to be in the short description of item 640, and it had the same effect as ''caramel''. I hate to suggest it, but is the field that has crunchiness and/or caramel in it, in your make_searchable array ? A couple of searches I tried seemed to indicate that the only field that was behaving as if it were indexed was the ''More Info'' data. (Oh, and thanks for using search_generator, its good to know its at least mildly useful :-)) enjoy, -jeremy -- ======================================================================= Jeremy Hinegardner jeremy-eg9WJcVQRd1EMKyauTCisw@public.gmane.org On Wed, May 11, 2005 at 11:32:08AM -0600, Pat Maddox wrote:> I don''t think so, I changed the layout to use the same one as the rest > of the site. And when I search for certain things, it only returns a > couple results. ''caramel'' was just a term I entered because I was > sure I''d only get a few results back. If you wouldn''t mind (or > anyone, for that matter), please take a look at www.hempheadhair.com > when you''ve got some time, try the search, and let me know if I''m just > being boneheaded. > > Thanks for the reply > > > > On 5/11/05, Derek Haynes <derek.haynes-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Pat, > > > > I''ve had no problems with the search generator - but one thing that is > > confusing is that the default layout contains a list of the index. > > > > So beneath your search results will be a list of all items in the > > index, which makes it appear as if a ton of results were returned. > > > > That''s probably not it - but just wanted to throw it out there. > > > > - Derek > > > > On 5/11/05, Pat Maddox <pergesu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I set up the search generator, made one of my models searchable, and > > > ran the indexer. When I perform a search, nearly all the items show > > > up for many queries. For example, the word ''caramel'' appears in only > > > three items in the db, yet there are a couple hundred results for it > > > when I search for it. What''s going on with this? > > > > > > Are there any alternatives to the search_generator that I can use that > > > work better? Or a way that I can make this work better? I understand > > > it won''t be perfect, but when it returns hundreds of results for a > > > keyword that appears in just a few db records, there''s a problem. > > > _______________________________________________ > > > Rails mailing list > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > -- > > Derek Haynes > > VIPDiner.com | CEO > > Cell - 404.593.4879 > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Originally I had the name, short description, and long description all indexed. After getting this problem with a lot of keywords, I opted to try indexing just the long description. I just indexed all three fields now, and it only returns two results for ''crunchiness'', but it''s still returning them all for ''caramel''. On 5/11/05, Jeremy Hinegardner <jeremy-eg9WJcVQRd1EMKyauTCisw@public.gmane.org> wrote:> It looks to me as if it is having the same problem that occurs when the > SimpleSearch cannot find a result, it returns all the results. I still > haven''t had time to investigate why this happens, but its a known issue > (to me at least). If you go to your search page and type in ''xyzzy'' or > something else that does not exist you''ll get the same result. > > But since you say ''caramel'' is in one of the search fields, I''m not sure > what is going on. I did the same with ''cruchiness'' which seems to be in > the short description of item 640, and it had the same effect as > ''caramel''. I hate to suggest it, but is the field that has crunchiness > and/or caramel in it, in your make_searchable array ? > > A couple of searches I tried seemed to indicate that the only field that > was behaving as if it were indexed was the ''More Info'' data. > > (Oh, and thanks for using search_generator, its good to know its at > least mildly useful :-)) > > enjoy, > > -jeremy > > -- > =======================================================================> Jeremy Hinegardner jeremy-eg9WJcVQRd1EMKyauTCisw@public.gmane.org > > On Wed, May 11, 2005 at 11:32:08AM -0600, Pat Maddox wrote: > > I don''t think so, I changed the layout to use the same one as the rest > > of the site. And when I search for certain things, it only returns a > > couple results. ''caramel'' was just a term I entered because I was > > sure I''d only get a few results back. If you wouldn''t mind (or > > anyone, for that matter), please take a look at www.hempheadhair.com > > when you''ve got some time, try the search, and let me know if I''m just > > being boneheaded. > > > > Thanks for the reply > > > > > > > > On 5/11/05, Derek Haynes <derek.haynes-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Pat, > > > > > > I''ve had no problems with the search generator - but one thing that is > > > confusing is that the default layout contains a list of the index. > > > > > > So beneath your search results will be a list of all items in the > > > index, which makes it appear as if a ton of results were returned. > > > > > > That''s probably not it - but just wanted to throw it out there. > > > > > > - Derek > > > > > > On 5/11/05, Pat Maddox <pergesu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > I set up the search generator, made one of my models searchable, and > > > > ran the indexer. When I perform a search, nearly all the items show > > > > up for many queries. For example, the word ''caramel'' appears in only > > > > three items in the db, yet there are a couple hundred results for it > > > > when I search for it. What''s going on with this? > > > > > > > > Are there any alternatives to the search_generator that I can use that > > > > work better? Or a way that I can make this work better? I understand > > > > it won''t be perfect, but when it returns hundreds of results for a > > > > keyword that appears in just a few db records, there''s a problem. > > > > _______________________________________________ > > > > Rails mailing list > > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > -- > > > Derek Haynes > > > VIPDiner.com | CEO > > > Cell - 404.593.4879 > > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > >