You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Frank A <fs...@gmail.com> on 2010/06/01 01:20:41 UTC

Lucene Newbie Questions

Hello all,
I'm considering Lucene for a specific application and am trying to ensure
that it is the right tool for what I'm trying to accomplish.

At a high level I have a list of restaurants in a database and a list of
tags related to the restaurant (e.g. Italian, Formal, Expensive, etc).  Each
restaurant also has a location (longitude/latitude).

My primary goal using Lucene is to conduct searches where the user can do
things like:

- Misspell the name of the restaurant (by a few chars)
- Type "Italian Food" instead of just Italian or perhaps "Great Italian"
- Or even use some synonyms (e.g. Deli and Delicatessen) - of course I'd
define these terms.

Are these types of use cases something that can be done with Lucene? Or is
there a more appropriate API that I haven't found?

Thanks.

Re: Lucene Newbie Questions

Posted by Shashi Kant <sk...@sloan.mit.edu>.
Based on your description, I would recommend Solr. It provides several
features such as spelling suggestion, faceting etc.
OOTB.

http://lucene.apache.org/solr/features.html

should answer all your questions.

On Mon, May 31, 2010 at 7:54 PM, Frank A <fs...@gmail.com> wrote:
> Thanks a bunch.
>
> Since I'm already inside a java based web application it would seem like
> both SOLR and Lucene would be plausible.  I'm curious what other factors I
> should know about in determing if SOLR or Lucene is right for me.
>
> Can SOLR be used within a web application (as a library) or is it only a
> standalone app.
>
> Frank
>
>
> On Mon, May 31, 2010 at 7:33 PM, N Hira <nh...@cognocys.com> wrote:
>
>> Frank --
>>
>> Lucene can definitely do this stuff.  This review of the Query Syntax might
>> offer you some insight:
>> http://lucene.apache.org/java/2_4_0/queryparsersyntax.html
>>
>> Specifically, you can look up "Fuzzy Searches" and "Synonyms".  There are a
>> couple of key ways to handle synonyms, so you might want to prototype that
>> before you settle on the approach you ultimately select.
>>
>> Be aware that Lucene is more of a "search library".  If you're looking for
>> a Web App. that can return XML or JSON, you might want to look into Solr,
>> which uses Lucene, but offers a lot of the architecture you might need:
>> http://lucene.apache.org/solr/
>>
>>
>> Good luck!
>>
>> -h
>>
>>
>>
>>
>> ----- Original Message ----
>> From: Frank A <fs...@gmail.com>
>> To: java-user@lucene.apache.org
>> Sent: Mon, May 31, 2010 6:20:41 PM
>> Subject: Lucene Newbie Questions
>>
>> Hello all,
>> I'm considering Lucene for a specific application and am trying to ensure
>> that it is the right tool for what I'm trying to accomplish.
>>
>> At a high level I have a list of restaurants in a database and a list of
>> tags related to the restaurant (e.g. Italian, Formal, Expensive, etc).
>>  Each
>> restaurant also has a location (longitude/latitude).
>>
>> My primary goal using Lucene is to conduct searches where the user can do
>> things like:
>>
>> - Misspell the name of the restaurant (by a few chars)
>> - Type "Italian Food" instead of just Italian or perhaps "Great Italian"
>> - Or even use some synonyms (e.g. Deli and Delicatessen) - of course I'd
>> define these terms.
>>
>> Are these types of use cases something that can be done with Lucene? Or is
>> there a more appropriate API that I haven't found?
>>
>> Thanks.
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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


Re: Lucene Newbie Questions

Posted by N Hira <nh...@cognocys.com>.
>From a legal/technical perspective, you can either embed Solr or you can use it as a WebApp.  I generally suggest that it be used as a separate WebApp, but that depends.  I would suggest the following criteria:
1.  Fitness to use cases
2.  Effort to develop/adapt
3.  Ease of deployment
4.  Effort to upgrade/maintain

Solr does "for free" some of the things (like index reopening/Searcher-pattern) that you would have to handle in your application if you used Lucene.  Depending on how much time you have and how much control you need, that may be a good or a bad thing.

You should be able to "try both" side-by-side in a few hours (the tutorials are pretty decent).

-h



----- Original Message ----
From: Frank A <fs...@gmail.com>
To: java-user@lucene.apache.org
Sent: Mon, May 31, 2010 6:54:26 PM
Subject: Re: Lucene Newbie Questions

Thanks a bunch.

Since I'm already inside a java based web application it would seem like
both SOLR and Lucene would be plausible.  I'm curious what other factors I
should know about in determing if SOLR or Lucene is right for me.

Can SOLR be used within a web application (as a library) or is it only a
standalone app.

Frank


On Mon, May 31, 2010 at 7:33 PM, N Hira <nh...@cognocys.com> wrote:

> Frank --
>
> Lucene can definitely do this stuff.  This review of the Query Syntax might
> offer you some insight:
> http://lucene.apache.org/java/2_4_0/queryparsersyntax.html
>
> Specifically, you can look up "Fuzzy Searches" and "Synonyms".  There are a
> couple of key ways to handle synonyms, so you might want to prototype that
> before you settle on the approach you ultimately select.
>
> Be aware that Lucene is more of a "search library".  If you're looking for
> a Web App. that can return XML or JSON, you might want to look into Solr,
> which uses Lucene, but offers a lot of the architecture you might need:
> http://lucene.apache.org/solr/
>
>
> Good luck!
>
> -h
>
>
>
>
> ----- Original Message ----
> From: Frank A <fs...@gmail.com>
> To: java-user@lucene.apache.org
> Sent: Mon, May 31, 2010 6:20:41 PM
> Subject: Lucene Newbie Questions
>
> Hello all,
> I'm considering Lucene for a specific application and am trying to ensure
> that it is the right tool for what I'm trying to accomplish.
>
> At a high level I have a list of restaurants in a database and a list of
> tags related to the restaurant (e.g. Italian, Formal, Expensive, etc).
>  Each
> restaurant also has a location (longitude/latitude).
>
> My primary goal using Lucene is to conduct searches where the user can do
> things like:
>
> - Misspell the name of the restaurant (by a few chars)
> - Type "Italian Food" instead of just Italian or perhaps "Great Italian"
> - Or even use some synonyms (e.g. Deli and Delicatessen) - of course I'd
> define these terms.
>
> Are these types of use cases something that can be done with Lucene? Or is
> there a more appropriate API that I haven't found?
>
> Thanks.
>
>
>
> ---------------------------------------------------------------------
> 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


Re: Lucene Newbie Questions

Posted by Frank A <fs...@gmail.com>.
Thanks a bunch.

Since I'm already inside a java based web application it would seem like
both SOLR and Lucene would be plausible.  I'm curious what other factors I
should know about in determing if SOLR or Lucene is right for me.

Can SOLR be used within a web application (as a library) or is it only a
standalone app.

Frank


On Mon, May 31, 2010 at 7:33 PM, N Hira <nh...@cognocys.com> wrote:

> Frank --
>
> Lucene can definitely do this stuff.  This review of the Query Syntax might
> offer you some insight:
> http://lucene.apache.org/java/2_4_0/queryparsersyntax.html
>
> Specifically, you can look up "Fuzzy Searches" and "Synonyms".  There are a
> couple of key ways to handle synonyms, so you might want to prototype that
> before you settle on the approach you ultimately select.
>
> Be aware that Lucene is more of a "search library".  If you're looking for
> a Web App. that can return XML or JSON, you might want to look into Solr,
> which uses Lucene, but offers a lot of the architecture you might need:
> http://lucene.apache.org/solr/
>
>
> Good luck!
>
> -h
>
>
>
>
> ----- Original Message ----
> From: Frank A <fs...@gmail.com>
> To: java-user@lucene.apache.org
> Sent: Mon, May 31, 2010 6:20:41 PM
> Subject: Lucene Newbie Questions
>
> Hello all,
> I'm considering Lucene for a specific application and am trying to ensure
> that it is the right tool for what I'm trying to accomplish.
>
> At a high level I have a list of restaurants in a database and a list of
> tags related to the restaurant (e.g. Italian, Formal, Expensive, etc).
>  Each
> restaurant also has a location (longitude/latitude).
>
> My primary goal using Lucene is to conduct searches where the user can do
> things like:
>
> - Misspell the name of the restaurant (by a few chars)
> - Type "Italian Food" instead of just Italian or perhaps "Great Italian"
> - Or even use some synonyms (e.g. Deli and Delicatessen) - of course I'd
> define these terms.
>
> Are these types of use cases something that can be done with Lucene? Or is
> there a more appropriate API that I haven't found?
>
> Thanks.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Re: Lucene Newbie Questions

Posted by N Hira <nh...@cognocys.com>.
Frank --

Lucene can definitely do this stuff.  This review of the Query Syntax might offer you some insight:
http://lucene.apache.org/java/2_4_0/queryparsersyntax.html

Specifically, you can look up "Fuzzy Searches" and "Synonyms".  There are a couple of key ways to handle synonyms, so you might want to prototype that before you settle on the approach you ultimately select.

Be aware that Lucene is more of a "search library".  If you're looking for a Web App. that can return XML or JSON, you might want to look into Solr, which uses Lucene, but offers a lot of the architecture you might need:
http://lucene.apache.org/solr/


Good luck!

-h




----- Original Message ----
From: Frank A <fs...@gmail.com>
To: java-user@lucene.apache.org
Sent: Mon, May 31, 2010 6:20:41 PM
Subject: Lucene Newbie Questions

Hello all,
I'm considering Lucene for a specific application and am trying to ensure
that it is the right tool for what I'm trying to accomplish.

At a high level I have a list of restaurants in a database and a list of
tags related to the restaurant (e.g. Italian, Formal, Expensive, etc).  Each
restaurant also has a location (longitude/latitude).

My primary goal using Lucene is to conduct searches where the user can do
things like:

- Misspell the name of the restaurant (by a few chars)
- Type "Italian Food" instead of just Italian or perhaps "Great Italian"
- Or even use some synonyms (e.g. Deli and Delicatessen) - of course I'd
define these terms.

Are these types of use cases something that can be done with Lucene? Or is
there a more appropriate API that I haven't found?

Thanks.



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Lucene Newbie Questions

Posted by Shashi Kant <sk...@sloan.mit.edu>.
You are certainly in the right place - Apache Solr (a search server
built using Lucene) provides what you are looking for out of the box.


On Mon, May 31, 2010 at 7:20 PM, Frank A <fs...@gmail.com> wrote:
> Hello all,
> I'm considering Lucene for a specific application and am trying to ensure
> that it is the right tool for what I'm trying to accomplish.
>
> At a high level I have a list of restaurants in a database and a list of
> tags related to the restaurant (e.g. Italian, Formal, Expensive, etc).  Each
> restaurant also has a location (longitude/latitude).
>
> My primary goal using Lucene is to conduct searches where the user can do
> things like:
>
> - Misspell the name of the restaurant (by a few chars)
> - Type "Italian Food" instead of just Italian or perhaps "Great Italian"
> - Or even use some synonyms (e.g. Deli and Delicatessen) - of course I'd
> define these terms.
>
> Are these types of use cases something that can be done with Lucene? Or is
> there a more appropriate API that I haven't found?
>
> Thanks.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org