All Downloads are FREE. Search and download functionalities are using the official Maven repository.

test.it.unimi.dsi.big.mg4j.query.nodes.DoublingTermExpander Maven / Gradle / Ivy

Go to download

MG4J (Managing Gigabytes for Java) is a free full-text search engine for large document collections written in Java. The big version is a fork of the original MG4J that can handle more than 2^31 terms and documents.

The newest version!
package it.unimi.dsi.big.mg4j.query.nodes;

import it.unimi.dsi.lang.MutableString;

public class DoublingTermExpander extends AbstractTermExpander {

	@Override
	public Query expand( Term term ) {
		return new MultiTerm( term, new Term( new MutableString( term.term ).append( term.term ) ) );
	}

	@Override
	public Query expand( Prefix prefix ) {
		return new MultiTerm( new Term( prefix.prefix ), new Term( new MutableString( prefix.prefix ).append( prefix.prefix ) ) );
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy