Examples of IndexField


Examples of edu.buffalo.cse.ir.wikiindexer.indexer.INDEXFIELD

   * .
   */
  @Test
  public final void testLookup() {
    // test that it creates entries
    INDEXFIELD testarr[] = INDEXFIELD.values();

    for (INDEXFIELD fld : testarr) {
      LocalDictionary dict = new LocalDictionary(idxProps, fld);
      int retVal = dict.lookup("test");
      assertTrue(retVal > 0);
View Full Code Here

Examples of edu.buffalo.cse.ir.wikiindexer.indexer.INDEXFIELD

   * {@link edu.buffalo.cse.ir.wikiindexer.indexer.Dictionary#exists(java.lang.String)}
   * .
   */
  @Test
  public final void testExists() {
    INDEXFIELD testarr[] = INDEXFIELD.values();

    for (INDEXFIELD fld : testarr) {
      LocalDictionary dict = new LocalDictionary(idxProps, fld);
     
      //test with empty
View Full Code Here

Examples of edu.buffalo.cse.ir.wikiindexer.indexer.INDEXFIELD

   * {@link edu.buffalo.cse.ir.wikiindexer.indexer.Dictionary#query(java.lang.String)}
   * .
   */
  @Test
  public final void testQuery() {
    INDEXFIELD testarr[] = INDEXFIELD.values();

    for (INDEXFIELD fld : testarr) {
      LocalDictionary dict = new LocalDictionary(idxProps, fld);
     
      //pre-populate with known terms
View Full Code Here

Examples of edu.buffalo.cse.ir.wikiindexer.indexer.INDEXFIELD

   * {@link edu.buffalo.cse.ir.wikiindexer.indexer.Dictionary#getTotalTerms()}
   * .
   */
  @Test
  public final void testGetTotalTerms() {
    INDEXFIELD testarr[] = INDEXFIELD.values();

    for (INDEXFIELD fld : testarr) {
      LocalDictionary dict = new LocalDictionary(idxProps, fld);
     
      //empty dictionary
View Full Code Here

Examples of org.apache.stanbol.entityhub.yard.solr.model.IndexField

    @Override
    public IndexField getField(String fieldName) {
        if (fieldName == null || fieldName.isEmpty()) {
            throw new IllegalArgumentException("The parsed field name MUST NOT be NULL!");
        }
        IndexField field = fieldMappings.get(fieldName);
        if (field == null) {
            if (getDocumentIdField().equals(fieldName)
                || fieldName.charAt(0) == SolrConst.SPECIAL_FIELD_PREFIX) {
                // in case of special field or the document ID, return null ->
                // meaning, that this index document field does not represent
View Full Code Here

Examples of org.apache.stanbol.entityhub.yard.solr.model.IndexField

                    path.add(fullName);
                }
            }
        }
        if (isLanguage) {
            return new IndexField(path, dataTypeEnumEntry.getIndexType(), language);
        } else {
            return new IndexField(path, dataTypeEnumEntry.getIndexType());
        }
    }
View Full Code Here

Examples of org.apache.stanbol.entityhub.yard.solr.model.IndexField

        }
    }

    @Override
    public Collection<String> getFieldNames(List<String> path, IndexValue indexValue) throws IllegalArgumentException {
        IndexField field;
        if (indexValue.hasLanguage()) {
            field = new IndexField(path, indexValue.getType(), indexValue.getLanguage());
        } else {
            field = new IndexField(path, indexValue.getType());
        }
        return getFieldNames(field);
    }
View Full Code Here

Examples of org.apache.stanbol.entityhub.yard.solr.model.IndexField

                    query.set(MIN_TERM_FREQ, 1);
                    query.set(INTERESTING_TERMS, "details");
                    query.set("mlt.boost", true); //testing
                    List<String> indexFields = new ArrayList<String>();
                    for(String field : fields){
                        IndexField indexField = new IndexField(Collections.singletonList(field),
                            IndexDataTypeEnum.TXT.getIndexType());
                        indexFields.addAll(fieldMapper.getFieldNames(indexField));
                    }
                    query.set(SIMILARITY_FIELDS, indexFields.toArray(new String[fields.size()]));
                    query.set(STREAM_BODY, indexValue.getValue());
View Full Code Here

Examples of org.apache.stanbol.entityhub.yard.solr.model.IndexField

        if (dataType == null) {
            indexConstraint.setInvalid("A Range Constraint MUST define at least a lower or an upper bound!");
        } else {
            //set the DATATYPE and FIED using an IndexField
            indexConstraint.setIndexFieldConstraints(
                new IndexField(indexConstraint.getPath(), dataType));
        }
        //set the value range
        if (rangeConstraint.isInclusive()) {
            indexConstraint.setFieldConstraint(IndexConstraintTypeEnum.LE, rangeConstraint.getUpperBound());
            indexConstraint.setFieldConstraint(IndexConstraintTypeEnum.GE, rangeConstraint.getLowerBound());
View Full Code Here

Examples of org.apache.stanbol.entityhub.yard.solr.model.IndexField

            constraintValue.getValues().add(indexValueFactory.createIndexValue(
                valueFactory.createText(text)));
        }
        //use a index field for DataType, Languages and the Field
        indexConstraint.setIndexFieldConstraints(
            new IndexField(indexConstraint.getPath(),
                IndexDataTypeEnum.TXT.getIndexType(),
                textConstraint.getLanguages()));
        //add the value for the constraint
        switch (textConstraint.getPatternType()) {
            case none:
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.