Package org.apache.lucene.index

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


    if (!fieldsToReadSet.isEmpty()) {
      try {
        TermEnum termEnum = indexReader.terms();
        while (termEnum.next()) {
          Term term = termEnum.term();
          String field = term.field();
          if (fieldsToReadSet.contains(field)) {
            // This is a value of a wanted field
            ArrayList valueList = (ArrayList) resultMap.get(field);
            valueList.add(term.text());
          }
View Full Code Here


      termEnum = reader.terms(new Term(_indexFieldName, ""));
      do {
        if (termEnum == null)
          break;
        Term term = termEnum.term();
        if (term == null || !_indexFieldName.equals(term.field()))
          break;

        // store term text
        // we expect that there is at most one term per document
        if (t > MAX_VAL_COUNT) {
View Full Code Here

    {
      TermEnum te = reader.terms(new Term(fieldName,""));
      while(te.next())
      {
        Term t = te.term();
        if (!fieldName.equals(t.field())) break;
        writer.println(t.field()+":"+t.text());
      }
      te.close();
    }
    writer.flush();
View Full Code Here

      TermEnum te = reader.terms(new Term(fieldName,""));
      while(te.next())
      {
        Term t = te.term();
        if (!fieldName.equals(t.field())) break;
        writer.println(t.field()+":"+t.text());
      }
      te.close();
    }
    writer.flush();
    writer.close();
View Full Code Here

        TermEnum te = terms(new Term(fieldName, ""));
        out.write(fieldName + ":\n");
        while (te.next())
        {
          Term term = te.term();
          if (!fieldName.equals(term.field()))
          {
            break;
          }
          out.write(term.text() + "\n");
        }
View Full Code Here

    try
    {
      do
      {
        Term term = termEnum.term();
        if (term == null || term.field() != field)
          break;

        if (t > order.maxValue())
        {
          throw new IOException("maximum number of value cannot exceed: "
View Full Code Here

      if (tenum != null)
      {
        do
        {
          Term term = tenum.term();
          if (term == null || !fieldName.equals(term.field()))
            break;

          String val = term.text();

          if (val != null)
View Full Code Here

      if (tenum != null)
      {
        do
        {
          Term term = tenum.term();
          if(term == null || !fieldName.equals(term.field()))
            break;
         
          String val = term.text();
         
          if (val != null)
View Full Code Here

    try {
      do {
        Term term = enumerator.term();
        if (term != null) {
          String text = term.text();
          if ((! text.startsWith(prefix)) || (! term.field().equals(fieldName))) {
            break;
          } else {
            matcher.reset( text.substring(prefixLength));
            if (matcher.matches()) {
              mtv.visitMatchingTerm(term);
View Full Code Here

    try {
      do {
        Term term = enumerator.term();
        if ((term != null)
            && term.text().startsWith(getPrefix())
            && term.field().equals(fieldName)) {
          mtv.visitMatchingTerm(term);
          expanded = true;
        } else {
          break;
        }
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.