lucenenet-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koga, Diego" <dik...@gmail.com>
Subject Re: Avoid letter searches
Date Thu, 29 Dec 2016 16:49:25 GMT
But that is to avoid indexing, isn't it?

If so, I'll still have the problem because my searches uses the
wildcard "*" at the end.

Or does it filter also the query when it parses:

            var parser = new
MultiFieldQueryParser(Lucene.Net.Util.Version.LUCENE_30,
fieldsToSearch, _analyzer);

            keyword = keyword.Replace("-", " ");

            keyword = QueryParser.Escape(keyword);

            var main = parser.Parse(string.Join(" ",
keyword.Trim().Split(' ').Where(x =>
!string.IsNullOrEmpty(x)).Select(x => x.Trim() == "*" ? x.Trim() :
x.Trim() + "*")));




Att.,
------------------
Koga, Diego


On Thu, Dec 29, 2016 at 11:26 AM, Itamar Syn-Hershko <itamar@code972.com> wrote:
> Yes,
> https://lucene.apache.org/core/4_5_0/analyzers-common/org/apache/lucene/analysis/miscellaneous/LengthFilter.html
>
> https://github.com/apache/lucenenet/blob/master/src/Lucene.Net.Core/Analysis/LengthFilter.cs
>
> --
>
> Itamar Syn-Hershko
> http://code972.com | @synhershko <https://twitter.com/synhershko>
> Freelance Developer & Consultant
> Lucene.NET committer and PMC member
>
> On Thu, Dec 29, 2016 at 6:17 PM, Koga, Diego <dikoga@gmail.com> wrote:
>
>> Guys,
>>
>> I am facing an issue if the search is letters like: a b c d e f g.
>>
>> These letters are everywhere which causes high amounts of processing
>> and does not mean anything at the end.
>>
>> Is there any way to avoid it other than split by spaces and check the
>> length of the string?
>>
>>
>> Thanks,
>>
>>
>> Att.,
>> ------------------
>> Koga, Diego
>>

Mime
View raw message