lucenenet-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kent Boogaart <kent.booga...@gmail.com>
Subject Re: Source not in solution
Date Mon, 09 Nov 2015 09:18:08 GMT
Thanks again Simon.

OK, I merged the PR you pointed to into my fork. However, I couldn’t help but notice there
are still exceptions because it (strangely) wasn’t always using the infrastructure he added.
Therefore, I made my own changes [1] to ensure that exceptions are never thrown, even when
searching.

Secondly, I was able to track down my primary issue. QueryParserTokenManager was using System.Console.Out
when creating its debug stream. Although I couldn’t tell you with 100% certainty, it seems
that running a mobile app without a debugger attached results in this stream simply not existing
and, hence, the error I was seeing. I’ve patched my fork [2] to simply remove the debug
stream altogether, since nothing was actually writing to it.

Since no changes are being applied to 3.x anymore I won’t bother to PR any of this, but
just thought I’d make you aware of it.

Cheers,
Kent

[1] https://github.com/kentcb/Xamarin-Lucene.Net/commit/1a024a2a6708cea5287d45c2070e7d407818a044
<https://github.com/kentcb/Xamarin-Lucene.Net/commit/1a024a2a6708cea5287d45c2070e7d407818a044>
[2] https://github.com/kentcb/Xamarin-Lucene.Net/commit/c60a62bf5c2154177dea636c799d5f064ebe640e
<https://github.com/kentcb/Xamarin-Lucene.Net/commit/c60a62bf5c2154177dea636c799d5f064ebe640e>


> On 9 Nov 2015, at 4:21 PM, Simon Svensson <sisve@devhost.se> wrote:
> 
> Hi,
> 
> There are several _usable_ branches, but there's no stable branches
> beyond 3.0.3. There is, however, [a open pull-request][1] for the 3.0.3
> branch that, from the looks of it, removes some exceptions from the
> query parser functionality.
> 
> // Simon
> 
> [1]: https://github.com/apache/lucenenet/pull/131 <https://github.com/apache/lucenenet/pull/131>
> 
> 
> On 07/11/15 12:57, Kent Boogaart wrote:
>> Thanks Simon.
>> 
>> So, just to be clear, there are no usable branches of Lucene.NET post 3.0.x? I was
assuming there was something usable because of this post: http://stackoverflow.com/a/24897255/1228288,
wherein Peter Bailey says be has used a later build to avoid the spurious exceptions I mentioned
in point #1.
>> 
>> Assuming there is nothing post 3.0.x I can use, my recourse here will be to simply
use the project as is and debug it to try to determine why I’m getting the second issue.
I can live with the first-chance exceptions, but the second issue is a blocker.
>> 
>> FWIW, the changes I needed to make to the core project to get it to build for iOS
were all to do with AppSettings, because ConfigurationManager simply doesn’t exist. Consequently,
there are some knock-on changes to Contants.cs and StringHelper.cs. One other thing I had
to do when I was using that project was to manually add the snowball analyzer in, since it
was omitted.
>> 
>> Cheers,
>> Kent
>> 
>>> On 7 Nov 2015, at 6:12 PM, Simon Svensson <sisve@devhost.se> wrote:
>>> 
>>> Hi Kent,
>>> 
>>> Based on the core/Util/Version.cs of chrigu-ebert/Xamarin-Lucene, it's
>>> version 3.0.x. The latest stable version of Lucene.Net <http://lucene.net/>
<http://lucene.net/ <http://lucene.net/>> is 3.0.3, so his
>>> sources seem correct. (I have, however, issues with his non-documented
>>> approach to modifying the source code. Are these changes that perhaps
>>> could go back to the real Lucene.Net <http://lucene.net/> <http://lucene.net/
<http://lucene.net/>> source?)
>>> 
>>> There are no newer stable code for you to use. I presume you tried the
>>> master branch of apache/lucenenet, but it's currently an in-progress
>>> port of Lucene 4.8 and is in no ways complete.
>>> 
>>> The MultiFieldQueryParser (and the QueryParser) are not longer present
>>> in the core, but moved to the [java-package
>>> org.apache.lucene.queryparser.classic][1]. This means that we'll have in
>>> a separate project once it's ported, but there is to timeline for that.
>>> 
>>> // Simon
>>> 
>>> [1]:
>>> https://lucene.apache.org/core/4_8_1/queryparser/org/apache/lucene/queryparser/classic/package-summary.html
<https://lucene.apache.org/core/4_8_1/queryparser/org/apache/lucene/queryparser/classic/package-summary.html>
<https://lucene.apache.org/core/4_8_1/queryparser/org/apache/lucene/queryparser/classic/package-summary.html
<https://lucene.apache.org/core/4_8_1/queryparser/org/apache/lucene/queryparser/classic/package-summary.html>>
>>> 
>>> On 07/11/15 07:50, Kent Boogaart wrote:
>>>> OK, I’ve changed tact. I’m instead building the Lucene.Net <http://lucene.net/>
source
>>>> whilst targeting Xamarin platforms.
>>>> 
>>>> I can get the core project to build with a few minor changes.
>>>> However, the Lucene.Net <http://lucene.net/> solution appears to be
completely missing
>>>> MultiFieldQueryParser. Where has this gone? Can anyone please
>>>> enlighten me - I’m struggling to reconcile the state of this project
>>>> against the Javadocs for Lucene itself (which shows that
>>>> MultiFieldQueryParser is still a thing).
>>>> 
>>>> Thanks, Kent
>>>> 
>>>>> On 7 Nov 2015, at 11:06 AM, Kent Boogaart <kent.boogaart@gmail.com
<mailto:kent.boogaart@gmail.com>>
>>>>> wrote:
>>>>> 
>>>>> Hi,
>>>>> 
>>>>> I’m using Lucene from a mobile app (using Xamarin) via this
>>>>> project: https://github.com/chrigu-ebert/Xamarin-Lucene.Net <https://github.com/chrigu-ebert/Xamarin-Lucene.Net>
>>>>> <https://github.com/chrigu-ebert/Xamarin-Lucene.Net <https://github.com/chrigu-ebert/Xamarin-Lucene.Net>
<https://github.com/chrigu-ebert/Xamarin-Lucene.Net <https://github.com/chrigu-ebert/Xamarin-Lucene.Net>>>
>>>>> 
>>>>> However, I would like to upgrade to a more recent Lucene.NET <http://lucene.net/>
<http://lucene.net/ <http://lucene.net/>>
>>>>> <http://lucene.net/ <http://lucene.net/> <http://lucene.net/
<http://lucene.net/>>> to address two issues I have. Briefly, the two
>>>>> issues I have are:
>>>>> 
>>>>> 1. First-chance exceptions are raised on every search, such as
>>>>> “IOException: read past eof” and “LookaheadSuccess: Error in the
>>>>> application” 2. On a brand new install of my app, the first attempt
>>>>> to search results in an exception: "System.IO.IOException: Invalid
>>>>> handle to path
>>>>> "/private/var/mobile/Containers/Bundle/Application/EDDBC7B3-E54E-46CC-BC51-0CDE18A066F4/my.app/[Unknown]””
>>>>> 
>>>>> 
>>>>> 
>>> My understanding is that later versions of Lucene.NET <http://lucene.net/>
<http://lucene.net/ <http://lucene.net/>>
>>> <http://lucene.net/ <http://lucene.net/> <http://lucene.net/ <http://lucene.net/>>>
have addressed #1. By upgrading I hope to also
>>> address #2, though even if I don’t I will be in a good position to look
>>> deeper into the matter.
>>>>> 
>>>>> As a starting point, I forked the Xamarin Lucene.NET <http://lucene.net/>
<http://lucene.net/ <http://lucene.net/>>
>>>>> <http://lucene.net/ <http://lucene.net/> <http://lucene.net/
<http://lucene.net/>>> project, cloned Lucene.NET <http://lucene.net/> <http://lucene.net/
<http://lucene.net/>>
>>>>> <http://lucene.net/ <http://lucene.net/> <http://lucene.net/
<http://lucene.net/>>>, and wrote a little script to copy like-named
>>>>> files from the Lucene.NET <http://lucene.net/> <http://lucene.net/
<http://lucene.net/>> <http://lucene.net/ <http://lucene.net/> <http://lucene.net/
<http://lucene.net/>>> source to the
>>>>> Xamarin Lucene.NET <http://lucene.net/> <http://lucene.net/
<http://lucene.net/>> <http://lucene.net/ <http://lucene.net/> <http://lucene.net/
<http://lucene.net/>>> source. Catastrophe!
>>>>> 
>>>>> It became evident that there are a lot of files in the Lucene.NET <http://lucene.net/>
<http://lucene.net/ <http://lucene.net/>>
>>>>> <http://lucene.net/ <http://lucene.net/> <http://lucene.net/
<http://lucene.net/>>> code base that aren’t even part of the main
>>>>> solution. I’m trying to understand why this is.
>>>>> 
>>>>> An example of such a file is StopwordAnalyzerBase.cs. It resides
>>>>> under src\Lucene.Net.Analysis.Common\Analysis\Util, so going by the
>>>>> readme it should be part of the core code base. However, it is not
>>>>> present in the solution.
>>>>> 
>>>>> Can anyone tell me why this is?
>>>>> 
>>>>> Thanks, Kent


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