Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NETify the public API where appropriate #280

Closed
clambertus opened this issue Jan 24, 2012 · 3 comments
Closed

.NETify the public API where appropriate #280

clambertus opened this issue Jan 24, 2012 · 3 comments
Milestone

Comments

@clambertus
Copy link

Although we haven't abandoned the line-by-line port of Java lucene, there are many idioms in Java that make little to no sense in a .NET assembly. The API can change to allow for a conventional .NET experience, while still maintaining the ability and ease during the porting process of Java logic.

  • Change Getxxx() and Setxxx() methods to .NET Properties
  • Implement the dispose pattern properly. Try, at all costs, to only use finalizers when necessary. They are expensive, and most of the classes used already have finalizers that will be called.
  • Convert Java Iterator-style classes (see TermEnum, TermDocs and others) to implement IEnumerable
  • When catching exceptions, do not use throw; instead of throw ex; to maintain the stack trace

JIRA link - [LUCENENET-467] created by ccurrens

@clambertus
Copy link
Author

TopFieldCollector still has a Java-style create method (with lower case 'c')
I'll submit a patch that changes it and all references to it.

by lvl

@clambertus
Copy link
Author

Thanks. Patch applied in revision 1347715

by ccurrens

@clambertus
Copy link
Author

Moving to 3.5

by ccurrens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants