Exemplo n.º 1
0
  public IndexResult search(Map<String, String> condition, int begin, int limit) {

    IndexResult resultIds = new IndexResult();
    resultIds.currentPos = 0;
    resultIds.timeCost = 0;
    resultIds.totalCount = 0;
    resultIds.contents = new IndexResultItem[0];
    resultIds.typedCount = new HashMap<IndexType, Integer>();
    resultIds = getExternalSearcher(0).search(condition, begin, limit);

    return resultIds;
  }
Exemplo n.º 2
0
  public SearchResult search(
      AbstractCondition condition,
      Map<IndexType, SearchViewFactory> factories,
      int begin,
      int limit) {

    IndexCondition ic = condition.buildIndexCondition();

    Map<String, String> query = ic.queryCondition;

    IndexResult resultIds = new IndexResult();
    resultIds.currentPos = 0;
    resultIds.timeCost = 0;
    resultIds.totalCount = 0;
    resultIds.contents = new IndexResultItem[0];
    resultIds.typedCount = new HashMap<IndexType, Integer>();
    resultIds = getExternalSearcher(0).search(query, begin, limit);

    SearchResult result = null;
    result = new SearchResult(resultIds, factories);
    return result;
  }