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: searchs based on text
Date Tue, 27 Feb 2007 15:02:10 GMT
Ricardo:

Well, your English is so much better than my Portuguese that I can only
congratulate you. You're perfectly understandable, so your efforts are
paying off!

About your question. It's quite easy to search on multiple terms. Just
submit the entire text to QueryParser.parse. Be sure that the default
operator (QueryParser.setDefaultOperator) is set to OR. You'll get back a
list of documents that are ordered by relevance, as Lucene calculates
relevance. You can use the "field:text" form to search across multiple
fields.

Several things, though.
> Give some thought to stemming both at index time and query time. Do this
if you think that the user would be well served by, for example "working"
being indexed as "work". So searching on "worker", "work", "working" would
all match (assuming you stemmed your query too).
> You may want to create a large list of stop words to exclude, again both
at index and query time.
> It *may* be useful to try to isolate the "important" words from the query.
But I'd only do this if submitting the whole text didn't give satisfactory
results.

Best
Erick

On 2/27/07, Ricardo Pereira da Silva <ricardo.psilva@gmail.com> wrote:
>
> I've started to study Lucene just today and the demos give me much
> information on how
> to begin to use it.
>
> But I have one doubt that I couldn't resolve reading the docs and the demo
> sources:
> All the examples just search in the index by just a single word, but I
> need
> to know
> if it's possible to search in the index using a reference text.
>
> Let me explain:
>   supose that a web user reaches the search page of my commercial website
> and needs
>   to find a solution about some trouble. Then he types a long text (about
> three or four paragraphs)
>   and next clicks on the search button.
>
>   In this cenario, it's that possible to perform a search through the
> index
> using that long text?
>
>   What I need it's something just like the Help system of microsoft
> office.
>
>   I apreciate if someone could give me some directions.
>
> Best Regards.
>
> Ricardo Pereira - Brazil
>
>
> PS: If someone finds some error in this text, please submit me the
> corrections. I'll apreciate the indications.
>      I don't have money to do a great english course and I have try to
> learn
> by myself usind the BBC site.
>

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