コード例 #1
0
ファイル: Search.java プロジェクト: nuruzzaman/dicoogle
  @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);
  }
コード例 #2
0
ファイル: Search.java プロジェクト: nuruzzaman/dicoogle
  @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);
  }