Skip to content

Commit

Permalink
Fulltext addon cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ragadeeshu committed Sep 12, 2017
1 parent 6324cdb commit 18a0d6c
Show file tree
Hide file tree
Showing 22 changed files with 12 additions and 16 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -32,15 +32,16 @@
import org.neo4j.values.storable.Value;
import org.neo4j.values.storable.Values;

import static org.apache.lucene.document.Field.Store.NO;
import static org.apache.lucene.document.Field.Store.YES;

class BloomDocumentStructure
class FulltextHelperDocumentStructure
{
static final String ID_KEY = "id";

private static final ThreadLocal<DocWithId> perThreadDocument = ThreadLocal.withInitial( DocWithId::new );

private BloomDocumentStructure()
private FulltextHelperDocumentStructure()
{
}

Expand All @@ -58,11 +59,6 @@ public static Document documentRepresentingProperties( long id, Map<String,Objec
return document.document;
}

public static long getNodeId( Document from )
{
return Long.parseLong( from.get( ID_KEY ) );
}

static Field encodeValueField( String propertyKey, Value value )
{
return BloomFieldEncoding.encodeField( propertyKey, value );
Expand All @@ -77,7 +73,7 @@ private static class DocWithId

private DocWithId()
{
idField = new StringField( ID_KEY, "", YES );
idField = new StringField( ID_KEY, "", NO );
idValueField = new NumericDocValuesField( ID_KEY, 0L );
document = new Document();
document.add( idField );
Expand Down
Expand Up @@ -38,12 +38,12 @@

public class FulltextHelperFactory
{
private FileSystemAbstraction fileSystem;
private final FileSystemAbstraction fileSystem;
private final String[] properties;
private final WritableIndexPartitionFactory partitionFactory;
private final Factory<IndexWriterConfig> population;
private final File storeDir;
private Analyzer analyzer;
private final Analyzer analyzer;

public LuceneFulltextHelper createFulltextHelper( String identifier, FULLTEXT_HELPER_TYPE type )
{
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.kernel.api.impl.fulltext.bloom.integration;
package org.neo4j.kernel.api.impl.fulltext.integrations.bloom;

import java.io.File;
import java.io.IOException;
Expand Down Expand Up @@ -56,9 +56,9 @@ public void init() throws IOException, ProcedureException
FulltextHelperProvider provider = FulltextHelperProvider.instance( db );
fulltextHelperFactory = new FulltextHelperFactory( fileSystemAbstraction, storeDir, config );
LuceneFulltextHelper nodes = fulltextHelperFactory.createFulltextHelper( "bloomNodes", FulltextHelperFactory.FULLTEXT_HELPER_TYPE.NODES );
provider.register( nodes );
LuceneFulltextHelper relationships =
fulltextHelperFactory.createFulltextHelper( "bloomRelationships", FulltextHelperFactory.FULLTEXT_HELPER_TYPE.RELATIONSHIPS );
provider.register( nodes );
provider.register( relationships );

procedures.register( new BloomProcedure( "Nodes", nodes ) );
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.kernel.api.impl.fulltext.bloom.integration;
package org.neo4j.kernel.api.impl.fulltext.integrations.bloom;

import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.io.fs.FileSystemAbstraction;
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.kernel.api.impl.fulltext.bloom.integration;
package org.neo4j.kernel.api.impl.fulltext.integrations.bloom;

import java.util.Arrays;

Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.kernel.api.impl.fulltext.bloom.integration;
package org.neo4j.kernel.api.impl.fulltext.integrations.bloom;

import org.junit.After;
import org.junit.Before;
Expand Down
2 changes: 1 addition & 1 deletion enterprise/pom.xml
Expand Up @@ -46,7 +46,7 @@
<module>deferred-locks</module>
<module>ha</module>
<module>procedure-compiler-enterprise-tests</module>
<module>fulltext-helper</module>
<module>fulltext-addon</module>
</modules>

<profiles>
Expand Down

0 comments on commit 18a0d6c

Please sign in to comment.