Package org.apache.lucene.search

Examples of org.apache.lucene.search.FieldComparatorSource


      workingThreads.incrementAndGet();

      try
      {
         FieldComparatorSource scs = queryImpl.isCaseInsensitiveOrder() ? this.sics : this.scs;
         Sort sort = new Sort(createSortFields(orderProps, orderSpecs, scs));
         final IndexReader reader = getIndexReader(queryImpl.needsSystemTree());
         JcrIndexSearcher searcher = new JcrIndexSearcher(session, reader, getContext().getItemStateManager());
         searcher.setSimilarity(getSimilarity());
         return new FilterMultiColumnQueryHits(searcher.execute(query, sort, resultFetchHint,
View Full Code Here


        }
        if (type == null) {
            throw new SearchParseException(context, "_script sorting requires setting the type of the script");
        }
        SearchScript searchScript = context.scriptService().search(context.lookup(), scriptLang, script, params);
        FieldComparatorSource fieldComparatorSource;
        if ("string".equals(type)) {
            fieldComparatorSource = StringFieldsFunctionDataComparator.comparatorSource(searchScript);
        } else if ("number".equals(type)) {
            fieldComparatorSource = DoubleFieldsFunctionDataComparator.comparatorSource(searchScript);
        } else {
View Full Code Here

      workingThreads.incrementAndGet();

      try
      {
         FieldComparatorSource scs = queryImpl.isCaseInsensitiveOrder() ? this.sics : this.scs;
         Sort sort = new Sort(createSortFields(orderProps, orderSpecs, scs));
         final IndexReader reader = getIndexReader(queryImpl.needsSystemTree());
         @SuppressWarnings("resource")
         JcrIndexSearcher searcher = new JcrIndexSearcher(session, reader, getContext().getItemStateManager());
         searcher.setSimilarity(getSimilarity());
View Full Code Here

     * @return sort by distance
     */
    public final SortField getSortField()
        throws ParseException {
        if (sortField == null) {
            final FieldComparatorSource dfcs =
                new DistanceFieldComparatorSource(getDistanceFilter());
            sortField = new SortField("dummy", dfcs);
        }
        return sortField;
    }
View Full Code Here

      workingThreads.incrementAndGet();

      try
      {
         FieldComparatorSource scs = queryImpl.isCaseInsensitiveOrder() ? this.sics : this.scs;
         Sort sort = new Sort(createSortFields(orderProps, orderSpecs, scs));
         final IndexReader reader = getIndexReader(queryImpl.needsSystemTree());
         @SuppressWarnings("resource")
         JcrIndexSearcher searcher = new JcrIndexSearcher(session, reader, getContext().getItemStateManager());
         searcher.setSimilarity(getSimilarity());
View Full Code Here

     */
    @Override
    public SortField[] sort()
    {
        return new SortField[]{
                new SortField(FIELD_NAME, new FieldComparatorSource()
                {
                    @Override
                    public FieldComparator<?>
                    newComparator(String field, int hits, int sort, boolean reversed) throws IOException
                    {
View Full Code Here

    }

    public SortField[] sortFields()
    {
        return new SortField[]{
                new SortField(FIELD_NAME, new FieldComparatorSource()
                {
                    @Override
                    public FieldComparator<?>
                    newComparator(String field, int hits, int sort, boolean reversed) throws IOException
                    {
View Full Code Here

      workingThreads.incrementAndGet();

      try
      {
         FieldComparatorSource scs = queryImpl.isCaseInsensitiveOrder() ? this.sics : this.scs;
         Sort sort = new Sort(createSortFields(orderProps, orderSpecs, scs));
         final IndexReader reader = getIndexReader(queryImpl.needsSystemTree());
         JcrIndexSearcher searcher = new JcrIndexSearcher(session, reader, getContext().getItemStateManager());
         searcher.setSimilarity(getSimilarity());
         return new FilterMultiColumnQueryHits(searcher.execute(query, sort, resultFetchHint,
View Full Code Here

      workingThreads.incrementAndGet();

      try
      {
         FieldComparatorSource scs = queryImpl.isCaseInsensitiveOrder() ? this.sics : this.scs;
         Sort sort = new Sort(createSortFields(orderProps, orderSpecs, scs));
         final IndexReader reader = getIndexReader(queryImpl.needsSystemTree());
         JcrIndexSearcher searcher = new JcrIndexSearcher(session, reader, getContext().getItemStateManager());
         searcher.setSimilarity(getSimilarity());
         return new FilterMultiColumnQueryHits(searcher.execute(query, sort, resultFetchHint,
View Full Code Here

TOP

Related Classes of org.apache.lucene.search.FieldComparatorSource

Copyright © 2018 www.massapicom. 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.