You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lucenenet.apache.org by "Popa, Sebastian" <Se...@philips.com> on 2014/10/15 11:26:01 UTC

SpanMultiTermQueryWrapper equivalent in C#

Hello,

I am porting a part of an older Java application using Lucene to a .NET application.

However, during porting it I got a bit stuck finding an equivalent for the following Java construction:

SpanQuery sq= new SpanMultiTermQueryWrapper(new FuzzyQuery(new Term("blahblah", aString, 2));

Could you please help me translate that to C# (I am using the package available on NuGet, Lucene.Net 3.0.3).

Looking forward for your answer.

Best regards,
Sebastian


Sebastian Popa

Senior Software Designer Healthcare, Scrum Master
Philips Innovation Services - Software Products and Systems
High Tech Campus 37 room 6.015
5656 AE Eindhoven, The Netherlands
E-mail: sebastian.popa@philips.com<ma...@philips.com>
Mobile: 0652878524
http://www.innovationservices.philips.com<http://www.innovationservices.philips.com/>
P   Save a tree...please don't print this e-mail unless you really need to


________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.

Re: SpanMultiTermQueryWrapper equivalent in C#

Posted by Michael O'Shea <mi...@gmail.com>.
Guys,

Prescott was asking if I could contribute.

I just looked at that class and it definitely does look straightforward
(famous last words).

How about I do it ?

Michael

On Wed, Oct 15, 2014 at 7:49 PM, Troy Howard <th...@gmail.com> wrote:

> Optionally, you could have a try at porting the class over to C#. A quick
> scan over the code and it seems fairly straightforward:
>
>
> https://svn.apache.org/repos/asf/lucene/dev/branches/lucene_solr_3_1/lucene/src/java/org/apache/lucene/search/spans/SpanMultiTermQueryWrapper.java
>
> Thanks,
> Troy
>
>
> On Wed, Oct 15, 2014 at 3:14 AM, Itamar Syn-Hershko <it...@code972.com>
> wrote:
>
> > Hi,
> >
> > I'm pretty sure that class was only introduced in 3.1 . Hopefully we will
> > have a 4.8 version out soon and you can use it there.
> >
> > Cheers,
> >
> > --
> >
> > Itamar Syn-Hershko
> > http://code972.com | @synhershko <https://twitter.com/synhershko>
> > Freelance Developer & Consultant
> > Author of RavenDB in Action <http://manning.com/synhershko/>
> >
> > On Wed, Oct 15, 2014 at 12:26 PM, Popa, Sebastian <
> > Sebastian.Popa@philips.com> wrote:
> >
> > > Hello,
> > >
> > > I am porting a part of an older Java application using Lucene to a .NET
> > > application.
> > >
> > > However, during porting it I got a bit stuck finding an equivalent for
> > the
> > > following Java construction:
> > >
> > > SpanQuery sq= new SpanMultiTermQueryWrapper(new FuzzyQuery(new
> > > Term("blahblah", aString, 2));
> > >
> > > Could you please help me translate that to C# (I am using the package
> > > available on NuGet, Lucene.Net 3.0.3).
> > >
> > > Looking forward for your answer.
> > >
> > > Best regards,
> > > Sebastian
> > >
> > >
> > > Sebastian Popa
> > >
> > > Senior Software Designer Healthcare, Scrum Master
> > > Philips Innovation Services - Software Products and Systems
> > > High Tech Campus 37 room 6.015
> > > 5656 AE Eindhoven, The Netherlands
> > > E-mail: sebastian.popa@philips.com<ma...@philips.com>
> > > Mobile: 0652878524
> > > http://www.innovationservices.philips.com<
> > > http://www.innovationservices.philips.com/>
> > > P   Save a tree...please don't print this e-mail unless you really need
> > to
> > >
> > >
> > > ________________________________
> > > The information contained in this message may be confidential and
> legally
> > > protected under applicable law. The message is intended solely for the
> > > addressee(s). If you are not the intended recipient, you are hereby
> > > notified that any use, forwarding, dissemination, or reproduction of
> this
> > > message is strictly prohibited and may be unlawful. If you are not the
> > > intended recipient, please contact the sender by return e-mail and
> > destroy
> > > all copies of the original message.
> > >
> >
>

Re: SpanMultiTermQueryWrapper equivalent in C#

Posted by Troy Howard <th...@gmail.com>.
Optionally, you could have a try at porting the class over to C#. A quick
scan over the code and it seems fairly straightforward:

https://svn.apache.org/repos/asf/lucene/dev/branches/lucene_solr_3_1/lucene/src/java/org/apache/lucene/search/spans/SpanMultiTermQueryWrapper.java

Thanks,
Troy


On Wed, Oct 15, 2014 at 3:14 AM, Itamar Syn-Hershko <it...@code972.com>
wrote:

> Hi,
>
> I'm pretty sure that class was only introduced in 3.1 . Hopefully we will
> have a 4.8 version out soon and you can use it there.
>
> Cheers,
>
> --
>
> Itamar Syn-Hershko
> http://code972.com | @synhershko <https://twitter.com/synhershko>
> Freelance Developer & Consultant
> Author of RavenDB in Action <http://manning.com/synhershko/>
>
> On Wed, Oct 15, 2014 at 12:26 PM, Popa, Sebastian <
> Sebastian.Popa@philips.com> wrote:
>
> > Hello,
> >
> > I am porting a part of an older Java application using Lucene to a .NET
> > application.
> >
> > However, during porting it I got a bit stuck finding an equivalent for
> the
> > following Java construction:
> >
> > SpanQuery sq= new SpanMultiTermQueryWrapper(new FuzzyQuery(new
> > Term("blahblah", aString, 2));
> >
> > Could you please help me translate that to C# (I am using the package
> > available on NuGet, Lucene.Net 3.0.3).
> >
> > Looking forward for your answer.
> >
> > Best regards,
> > Sebastian
> >
> >
> > Sebastian Popa
> >
> > Senior Software Designer Healthcare, Scrum Master
> > Philips Innovation Services - Software Products and Systems
> > High Tech Campus 37 room 6.015
> > 5656 AE Eindhoven, The Netherlands
> > E-mail: sebastian.popa@philips.com<ma...@philips.com>
> > Mobile: 0652878524
> > http://www.innovationservices.philips.com<
> > http://www.innovationservices.philips.com/>
> > P   Save a tree...please don't print this e-mail unless you really need
> to
> >
> >
> > ________________________________
> > The information contained in this message may be confidential and legally
> > protected under applicable law. The message is intended solely for the
> > addressee(s). If you are not the intended recipient, you are hereby
> > notified that any use, forwarding, dissemination, or reproduction of this
> > message is strictly prohibited and may be unlawful. If you are not the
> > intended recipient, please contact the sender by return e-mail and
> destroy
> > all copies of the original message.
> >
>

Re: SpanMultiTermQueryWrapper equivalent in C#

Posted by Itamar Syn-Hershko <it...@code972.com>.
Hi,

I'm pretty sure that class was only introduced in 3.1 . Hopefully we will
have a 4.8 version out soon and you can use it there.

Cheers,

--

Itamar Syn-Hershko
http://code972.com | @synhershko <https://twitter.com/synhershko>
Freelance Developer & Consultant
Author of RavenDB in Action <http://manning.com/synhershko/>

On Wed, Oct 15, 2014 at 12:26 PM, Popa, Sebastian <
Sebastian.Popa@philips.com> wrote:

> Hello,
>
> I am porting a part of an older Java application using Lucene to a .NET
> application.
>
> However, during porting it I got a bit stuck finding an equivalent for the
> following Java construction:
>
> SpanQuery sq= new SpanMultiTermQueryWrapper(new FuzzyQuery(new
> Term("blahblah", aString, 2));
>
> Could you please help me translate that to C# (I am using the package
> available on NuGet, Lucene.Net 3.0.3).
>
> Looking forward for your answer.
>
> Best regards,
> Sebastian
>
>
> Sebastian Popa
>
> Senior Software Designer Healthcare, Scrum Master
> Philips Innovation Services - Software Products and Systems
> High Tech Campus 37 room 6.015
> 5656 AE Eindhoven, The Netherlands
> E-mail: sebastian.popa@philips.com<ma...@philips.com>
> Mobile: 0652878524
> http://www.innovationservices.philips.com<
> http://www.innovationservices.philips.com/>
> P   Save a tree...please don't print this e-mail unless you really need to
>
>
> ________________________________
> The information contained in this message may be confidential and legally
> protected under applicable law. The message is intended solely for the
> addressee(s). If you are not the intended recipient, you are hereby
> notified that any use, forwarding, dissemination, or reproduction of this
> message is strictly prohibited and may be unlawful. If you are not the
> intended recipient, please contact the sender by return e-mail and destroy
> all copies of the original message.
>

FW: SpanMultiTermQueryWrapper equivalent in C#

Posted by "Popa, Sebastian" <Se...@philips.com>.
Hello,

I already asked on the Users mailing list the same question, and I was advised to ask also on this developers list.

I need to use:

-          Lucene.Net, and

-          Lucene.Net.Contrib
In an application that needs to be ported to .NET.
However one of the crucial functions of the application uses SpanMultiTermQueryWrapper.


It might be that a branch 3.1 would contain already this class.
Could you please help me in recompiling a version of the libraries that contains the class described above?



Best regards,
Sebastian


Sebastian Popa

Senior Software Designer Healthcare, Scrum Master
Philips Innovation Services - Software Products and Systems
High Tech Campus 37, Room 6.015
5656 AE Eindhoven, The Netherlands
E-mail: sebastian.popa@philips.com
Mobile: 0652878524
http://www.innovationservices.philips.com

P   Save a tree...please don't print this e-mail unless you really need to






From: Michael O'Shea [mailto:michael.a.oshea@gmail.com]
Sent: maandag 20 oktober 2014 12:19
To: Popa, Sebastian
Subject: RE: SpanMultiTermQueryWrapper.cs


I would suggest you fork the 3.0.3 branch and call it 3.1.

Before you do that, I recommend that you're double-check with the regulars which of branch 3.0.3 or 3.0.3_2 constitutes the latest and fork *that* branch.

The final step to let me collaborate with you is to let me clone your new branch 3.1. I however don't have the required git know-how to do that or assist in doing so.

So your question to the dev list (another address than the user list) should be:
- what branch to fork ?
- how do I get the fork to show up in github ?

Cheers,

Michael




From: Popa, Sebastian
Sent: woensdag 15 oktober 2014 11:26
To: user@lucenenet.apache.org
Subject: SpanMultiTermQueryWrapper equivalent in C#

Hello,

I am porting a part of an older Java application using Lucene to a .NET application.

However, during porting it I got a bit stuck finding an equivalent for the following Java construction:

SpanQuery sq= new SpanMultiTermQueryWrapper(new FuzzyQuery(new Term("blahblah", aString, 2));

Could you please help me translate that to C# (I am using the package available on NuGet, Lucene.Net 3.0.3).

Looking forward for your answer.

Best regards,
Sebastian


Sebastian Popa

Senior Software Designer Healthcare, Scrum Master
Philips Innovation Services - Software Products and Systems
High Tech Campus 37 room 6.015
5656 AE Eindhoven, The Netherlands
E-mail: sebastian.popa@philips.com<ma...@philips.com>
Mobile: 0652878524
http://www.innovationservices.philips.com<http://www.innovationservices.philips.com/>
P   Save a tree...please don't print this e-mail unless you really need to


________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.