Package it.unibz.instasearch.indexing

Examples of it.unibz.instasearch.indexing.SearchResult


    }
   
    if( searchQuery.equals(currentSearchQuery) && cachedResults != null ) // same query
      return cachedResults;
   
    SearchResult result = null;
    cachedResults = null;
    resultCount = 0;
    Object[] resultArray = null;
   
    if(searchString != null)
    {
      try {
        result = searcher.search(searchQuery); // do the search
        currentSearchQuery = searchQuery;
       
        if( result == null ) {
          if( !searchQuery.isFuzzy() ) {
            SearchQuery newQuery = new SearchQuery(searchQuery);
            newQuery.setExact(false);
            newQuery.setFuzzy(true);
            resultArray = new Object[]{NO_RESULTS_MESSAGE, newQuery}; // add fuzzy query
          } else {
            resultArray = new Object[]{NO_RESULTS_MESSAGE};
          }
         
          cachedResults = resultArray;
         
          return resultArray;
        }
       
        searchTerms = result.getSearchTerms();
       
      } catch (Exception e) {
        InstaSearchPlugin.log(e);
        return new Exception[]{e};
      }
    }
   
    List<SearchResultDoc> resultDocs = result.getResultDocs();
    this.resultCount = resultDocs.size();
   
    boolean addMoreResults = false, addFindSimilar = false;
   
    if( searchQuery.isLimited() && result.isFull() ) { // if only showing limited number of matches
      addMoreResults = true;
    }
    else
    {
      if( searchQuery.isExact() && !searchQuery.isFuzzy() ) // if query is exact, can try search for individual tokens
View Full Code Here

TOP

Related Classes of it.unibz.instasearch.indexing.SearchResult

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.