Examples of createTerm()


Examples of org.apache.lucene.index.Term.createTerm()

      if (extendedResults == true && reader != null && field != null) {
        term = term.createTerm(tokenText);
        result.add(token, reader.docFreq(term));
        int countLimit = Math.min(count, suggestions.length);
        for (int i = 0; i < countLimit; i++) {
          term = term.createTerm(suggestions[i]);
          result.add(token, suggestions[i], reader.docFreq(term));
        }
      } else {
        if (suggestions.length > 0) {
          List<String> suggList = Arrays.asList(suggestions);
View Full Code Here

Examples of org.apache.lucene.index.Term.createTerm()

    List<String> terms = StrUtils.splitSmart(termList, ",", true);
    NamedList res = new NamedList();
    Term t = new Term(field);
    for (String term : terms) {
      String internal = ft.toInternal(term);
      int count = searcher.numDocs(new TermQuery(t.createTerm(internal)), base);
      res.add(term, count);
    }
    return res;   
  }
View Full Code Here

Examples of org.apache.lucene.index.Term.createTerm()

                    TermDocs tDocs = reader.termDocs();
                    try {
                        ItemStateManager ism = getContext().getItemStateManager();
                        for (NodeId id : removedIds) {
                            aggregateIds =
                                aggregateIds.createTerm(id.toString());
                            tDocs.seek(aggregateIds);
                            while (tDocs.next()) {
                                Document doc = reader.document(
                                        tDocs.doc(), FieldSelectors.UUID);
                                NodeId nId = new NodeId(doc.get(FieldNames.UUID));
View Full Code Here

Examples of org.apache.lucene.index.Term.createTerm()

   
    final Term term = new Term(fieldName);
    // iterate through each boxid
    for (int i =0; i< sz; i++) {
      double boxId = area.get(i).doubleValue();
      termDocs.seek(term.createTerm(NumericUtils.doubleToPrefixCoded(boxId)));
      // iterate through all documents
      // which have this boxId
      while (termDocs.next()) {
        bits.set(termDocs.doc());
      }
View Full Code Here

Examples of org.apache.lucene.index.Term.createTerm()

        {
          term = new Term(fieldName, token.termText());
        } else
        {
//           create from previous to save fieldName.intern overhead
          term = term.createTerm(token.termText());
        }
        tf.addTerm(term);
        token = ts.next();
      }
    }
View Full Code Here

Examples of org.apache.lucene.index.Term.createTerm()

                TermDocs tDocs = reader.termDocs();
                try {
                    ItemStateManager ism = getContext().getItemStateManager();
                    for (NodeId id : removedIds) {
                        aggregateIds =
                            aggregateIds.createTerm(id.toString());
                        tDocs.seek(aggregateIds);
                        while (tDocs.next()) {
                            Document doc = reader.document(
                                    tDocs.doc(), FieldSelectors.UUID);
                            NodeId nId = new NodeId(doc.get(FieldNames.UUID));
View Full Code Here

Examples of org.apache.lucene.index.Term.createTerm()

                if (t == null) {
                    return t;
                }
                if (t.field().equals(FieldNames.PROPERTIES)) {
                    String text = t.text();
                    return t.createTerm(text.replace(oldSepChar, '['));
                } else {
                    return t;
                }
            }
View Full Code Here

Examples of org.apache.lucene.index.Term.createTerm()

                TermDocs tDocs = reader.termDocs();
                try {
                    ItemStateManager ism = getContext().getItemStateManager();
                    for (NodeId id : removedIds) {
                        aggregateIds =
                            aggregateIds.createTerm(id.toString());
                        tDocs.seek(aggregateIds);
                        while (tDocs.next()) {
                            Document doc = reader.document(
                                    tDocs.doc(), FieldSelectors.UUID);
                            NodeId nId = new NodeId(doc.get(FieldNames.UUID));
View Full Code Here

Examples of org.apache.lucene.index.Term.createTerm()

                     {
                        ItemDataConsumer ism = getContext().getItemStateManager();
                        for (Iterator<String> it = removedNodeIds.iterator(); it.hasNext();)
                        {
                           String id = it.next();
                           aggregateUUIDs = aggregateUUIDs.createTerm(id);
                           tDocs.seek(aggregateUUIDs);
                           while (tDocs.next())
                           {
                              Document doc = reader.document(tDocs.doc(), FieldSelectors.UUID);
                              String uuid = doc.get(FieldNames.UUID);
View Full Code Here

Examples of org.apache.lucene.index.Term.createTerm()

                    try {
                        ItemStateManager ism = getContext().getItemStateManager();
                        Iterator it = removedNodeIds.iterator();
                        while (it.hasNext()) {
                            NodeId id = (NodeId) it.next();
                            aggregateUUIDs = aggregateUUIDs.createTerm(
                                    id.getUUID().toString());
                            tDocs.seek(aggregateUUIDs);
                            while (tDocs.next()) {
                                Document doc = reader.document(tDocs.doc(), FieldSelectors.UUID);
                                String uuid = doc.get(FieldNames.UUID);
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.