LuceneNetDemo icon indicating copy to clipboard operation
LuceneNetDemo copied to clipboard

Demo uses old version of nuget package and crashes with latest versions

Open warrenfalk opened this issue 7 years ago • 3 comments

System.TypeLoadException occurred
  HResult=0x80131522
  Message=Method 'CreateComponents' in type 'Lucene.Net.Analysis.Standard.StandardAnalyzer' from assembly 'Lucene.Net.Analysis.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
  Source=LuceneNetDemo
  StackTrace:
   at LuceneNetDemo.GitHubIndex..ctor(Directory indexDirectory) in LuceneNetDemo\GitHubIndex.cs:line 56
   at LuceneNetDemo.Program.Main(String[] args) in LuceneNetDemo\Program.cs:line 12

This actually appears to be a bug in the latest NuGet package rather than the demo, but it isn't clear to me how to submit an issue on the main Lucene.Net project.

The latest versions at this time which exhibit this issue:

  <package id="Lucene.Net" version="4.8.0.770-beta" targetFramework="net461" />
  <package id="Lucene.Net.Analysis.Common" version="4.8.0.1035-beta" targetFramework="net461" />

It looks like the issue is the 4.8.0.1035 in Lucene.Net.Analysis.Common. This is the version you get if you ask for latest pre-release. But for Lucene.Net you get 4.8.0.770. If you specify 4.8.0.770-beta of Lucene.Net.Analysis.Common, the issue goes away. Did 1035 get released by accident?

warrenfalk avatar Jun 09 '17 12:06 warrenfalk

By the way, can I make a slightly off topic comment? I love this project. I've wished for a more recent .Net port of Lucene for forever and was thrilled to find that this was actually in the works. This is exactly what I've been needing and I badly want to contribute to and use this project, but this has turned out to be difficult.

Allow me to offer a view from the outside looking in. These aren't criticisms, they are only observations from an outsider perspective.

First, on first glance, the project looks like it was abandoned in 2012. If you google Lucene .Net, you get the Lucene.Net home page the "recent" news shows the release of 3.0.3 from 4 years ago. Adding a recent update on that page to say "4.8.0 is in beta, see this video, and checkout the github mirror" would probably result in a huge boost in interest.

Second, if you do manage to find the github repo, it does show 4.8.0 but doesn't give any dates on that, so if you thought that the project was abandoned around 2012 because you saw the front page, then the github repo only reassures you that at some time after 2012 someone started working on 4.8.0 and got it to "beta" but it still doesn't reassure you that the progress is still ongoing at this moment. If you look closely you can see that there are recent commits, which is slightly more reassuring, but you still have to dig even deeper to see whether the recent commits are frequent.

~~Third, being hosted on a myget repo instead of nuget makes it harder to use. I'm assuming there are reasons, but nuget supports pre-releases and having the packages up on nuget would help to spur interest and also help to show the project isn't abandoned.~~ UPDATE: it looks like these were made available on NuGet last month and I missed it. Thanks!

Fourth, it is not clear how to contribute. The github repo says it is only a mirror and there is no place to report issues. If you find an issue, as I did above just from trying to use the latest pre-releases from myget, there is no place to report them, which also makes it look like the project is dead. The "Contributing" section of the README says "Lucene is a very large project (over 350,000 executable lines of code) and we welcome any and all help to maintain such an effort." but it doesn't say how to do that. If you look deeper you might notice a CONTRIBUTING.md file but that file mentions a developer mailing list ([email protected]) which bounces. I was able to eventually find the Jira site, but it isn't clear if issues should be reported there or not, and if so, how to report it.

I think I only discovered that recent work was being done by watching synhershko's video on the Channel 9 blog (thanks for that, btw)

I took a fair amount of time documenting the above because I hope someone will find it useful. And I really hope it doesn't offend. I am so glad this project is not dead and I hope that all the work put into it doesn't get ignored by a large audience that doesn't think "the lights are on".

warrenfalk avatar Jun 09 '17 13:06 warrenfalk

If you would like to contribute, we would surely appreciate it. Sorry it is such a PITA, that is mostly due to it being an Apache-run project, which favors the Java ecosystem, and as such uses a variety of tools that GitHub users aren't familiar with. This is pretty much the same criticism that I have been touting, but have pretty much given up because it is an Apache policy to:

  1. Host their own source code repos (for sources (git) and binaries (subversion))
  2. Use JIRA for issue tracking
  3. Control the release process
  4. Control the wiki
  5. Those and all of the separate permissions that you have to request individually for each one

That said, I am a bit disappointed to hear you didn't find it helpful because I recently improved the README.md page to contain much more helpful information than it did previously. Here is what it looked like up until a few months ago.

I don't personally have permission to edit the Lucene.Net web site, wiki, this demo, or the old CI feed at MyGet and I am too busy working on the release to bother (except for the pull request I submitted here, which has now thanks to your issue been merged), so these have all gone out of date. But if you want to take the initiative to help manage getting all of this information updated and/or work on the new API docs, or a new web site, we would appreciate it.

There was a proposal from @synhershko to make a new web site about 6 months ago and there were even a couple of people on the mailing list that offered to help, but I am not sure what happened with that project or even if those people were replied to. Unfortunately, @synhershko hasn't been very active on Lucene.Net lately..

As far as "how" to contribute...

  1. First of all, there are 3 different mailing lists on the wiki page. None of them start with list, you have to replace the word list with the name of the list. For example, to subscribe to the dev list, you would use [email protected].
  2. Secondly, Apache has huge amounts of documentation about contributing to their projects. If you ask me, it is too overwhelming to most people who just want to casually contribute.
  3. Third, there is also a getting involved WIKI page that is a bit out of date.
  4. And of course there is the CONTRIBUTING.md and README.md pages on the lucenenet repo.

Basically, you should join the dev mailing list using the above email. State what you are interested in working on and wait for a reply. You can get some ideas about what is left from the CONTRIBUTING.md page or the JIRA, or you can make a suggestion for a new task.

Apache considers these lists the central place where communication happens (rather than the much more intuitive GitHub issue tracker), so it is best to do all development discussions there. Those mailing lists are archived and available for view online.

Once you get a task to work on, then it is pretty much clone the repo from GitHub, edit, commit, and submit a pull request just like any other GitHub project.

One thing that is pretty high on the list of things to do is to refactor the TermsEnum, DocsEnum, DocsAndPositionsEnum and subclasses to implement IEnumerator<T> so they can be used with a foreach loop. I have also been trying to make the API more developer-friendly by fixing/documenting the method that is required to use collection intitializers, adding extension methods, etc.

Anyway, at the very least I would appreciate some feedback on how to change the README.md to make it easier (still) to contribute. But we would certainly appreciate if you help out, even if it is only to help making contributing easier for others.

NightOwl888 avatar Jul 05 '17 01:07 NightOwl888

It looks like the issue is the 4.8.0.1035 in Lucene.Net.Analysis.Common. This is the version you get if you ask for latest pre-release. But for Lucene.Net you get 4.8.0.770. If you specify 4.8.0.770-beta of Lucene.Net.Analysis.Common, the issue goes away. Did 1035 get released by accident?

Yes, it did get released by accident. Unfortunately, I don't have access to that (now obsolete) feed so have no way to clean it up.

The fix for this issue is to delete the NuGet.config from this repository (or any fork of it) before running it. It shouldn't be there since we are now on NuGet.

NightOwl888 avatar Jul 15 '17 16:07 NightOwl888