Beispiel #1
0
  @Override
  public ListObservableSearch<SearchResult> SearchToExport(
      String query,
      boolean keywords,
      HashMap<String, Boolean> plugins,
      ArrayList<String> eFields,
      Observer obs)
      throws RemoteException {
    if (query.isEmpty()) {
      query = "*:*";
    } else {
      if (!keywords) {
        QueryExpressionBuilder _expression = new QueryExpressionBuilder(query);
        query = _expression.getQueryString();
      }
    }

    return searchHelper.search(query, eFields, plugins, true, obs);
  }
Beispiel #2
0
  @Override
  public void Search(String query, boolean keywords, HashMap<String, Boolean> plugins)
      throws RemoteException {

    if (query.isEmpty()) {

      query = "*:*";
    } else {
      if (!keywords) {
        /**
         * Write the QueryString respecting BNF grammer defined regarding Lucene documentation 2.4.X
         * branch
         */
        QueryExpressionBuilder _expression = new QueryExpressionBuilder(query);
        query = _expression.getQueryString();
      }
      // DebugManager.getInstance().debug(">>> New Query String is:" + query);

    }
    searchTime = 0;
    searchHelper.search(query, extrafields, plugins, false);
  }