lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <erickerick...@gmail.com>
Subject Re: Customized Analyzer
Date Wed, 06 Dec 2006 13:42:51 GMT
Chris is asking you to post a program that *he* can compile and run that
demonstrates the problem. So far, you've posted code that requires other
parts of your system to be present in order to compile and run. That makes
it hard to see the problem. For all we know,
access.getProductsByKeyword(keyword);
throws an exception that's handled in a way that fails benignly. Or maybe it
just creates a collection but fails to assign it to the return properly. Or
you're connecting to a different searcher than you think you are. Or there's
a real problem in Lucene. Or...... The point is that there are so many
hidden parts that we can't see that it's hard to help.

One real value of the exercise is it forces one to concentrate on the
fundamental expected behavior of the product in question, Lucene in this
case. 99 times out of 100, when I try this, I can't demonstrate a failure
case and realize that it's not the problem I thought it was.


Best
Erick

On 12/6/06, Alice <alicelista@gmail.com> wrote:
>
> I'm sorry, I'm not sure about what you're asking me to post, anyway here
> is
> my junit test:
>
>
> protected void setUp() throws Exception
>     {
>         super.setUp();
>
>         access = ServiceLocator.getAccess();
>     }
>
> public void testSearch() throws Exception
>     {
>         String keyword = "wind";
>
>         Collection<ProductDTO> products =
> access.getProductsByKeyword(keyword);
>
>         System.out.println(products.size() + " products found:");
>         for(ProductDTO product : products)
>         {
>             System.out.println(product.getName() + " " +
> product.getModel());
>         }
>     }
>
>
>
> -----Original Message-----
> From: Chris Hostetter [mailto:hossman_lucene@fucit.org]
> Sent: terça-feira, 5 de dezembro de 2006 20:54
> To: Lucene Users
> Subject: RE: Customized Analyzer
>
>
> As stated before, a *self contained* test case would help people diagnose
> your problem ... just cutting and pasting a few snippets of your code is
> not enough for people to reproduce your problem.
>
>
> : And the return is: contents:"(wind window)"
>
> a MultiPhraseQuery that looks like that should be functionally equivilent
> to a BooleanQuery .. as a matter of fact, it will rewrite to a
> BooleanQuery ... does a straight search on either "wind" or "window"
> return any results for you?
>
>
>
> -Hoss
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message