lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shad Storhaug <>
Subject RE: conversion
Date Wed, 03 May 2017 17:19:18 GMT

This is one of the interesting things with working on a Java port such as this - you pick
up a few things about .NET that you didn't already know.

String interning is an optimization that minimizes the memory needed to store strings. It
essentially ensures that if you have 2 or more strings with the same value, they only appear
once in RAM.

As for why they are used in .NET but not Java, I suspect that someone saw an opportunity to
make an optimization by using interning. That said, you might want to review to make sure
it is doing what it is supposed to do.

FYI - Highlighter was ported several months ago on pull request #191 (,
which was merged to master last week. If you need to use it, it is available now on our CI
feed ( Pending a release vote, we will have a
beta up on NuGet in a couple of days.

That said, we still have some missing pieces - see our contributing page for the current status: If you want to help out we
certainly would appreciate it. The most pressing issues are some flakey tests and fixing documentation
comments - and of course we could use some help getting it setup to generate the documentation.
But there are also some modules to port and command-line tools to build into executables,
if you are interested.

Shad Storhaug (NightOwl888)

-----Original Message-----
From: Matt Diehl [] 
Sent: Wednesday, May 3, 2017 11:19 PM
Subject: conversion


Has anyone converted this yet? I pulled from the latest checked-in branch and was working
on getting this compiling. Most of the conversion is adding/removing "()" and changing 'count'
to 'size' and removing 'get' from function names. I've not worked with this before, and I
have a question.

if (fieldName != null)
    fieldName = StringHelper.Intern(fieldName); }

I keep seeing the the above call. It seems like some sort of sanity-cleaning funciton that
takes a string and returns a string. It doesn't really exist though (and doesn't exist in
Java Lucene from my searching). Can someone help me?

View raw message