SearchEngine.java revision 1185
822N/A * See LICENSE.txt included in this distribution for the specific
822N/A * file and include the License file at LICENSE.txt.
822N/Apublic class SearchEngine {
822N/A private final static boolean docsScoredInOrder = false;
822N/A boolean allCollected;
822N/A public SearchEngine() {
822N/A return new QueryBuilder()
public boolean isValidQuery() {
boolean ret;
} catch (Exception e) {
ret = false;
return ret;
if (!paging) {
IndexReader ireader = (IndexReader.open(FSDirectory.open(new File(droot,project.getPath()) ),true));
if (!paging) {
* Note that this search will return the first cachePages of hitsPerPage, for more you need to call more
public int search() {
//TODO support paging per project (in search.java)
} catch (Exception e) {
} catch (Exception e) {
} catch (Exception e) {
} catch (Exception e) {
allCollected=true;
//TODO generation of ret(results) could be cashed and consumers of engine would just print them in whatever form they need, this way we could get rid of docs
boolean hasContext = false;
r = new TagFilter(new BufferedReader(new InputStreamReader(new GZIPInputStream(new FileInputStream(data + "/xref" + filename+".gz"))))); }
r.close();
//TODO FIX below fragmenter according to either summarizer or context (to get line numbers, might be hard, since xref writers will need to be fixed too, they generate just one line of html code now :( )
hasContext = true;
OpenGrokLogger.getLogger().warning("Couldn't read summary from "+filename+" ("+exp.getMessage()+")");
if(!hasContext) {
} catch (IOException e) {
} catch (ClassNotFoundException e) {
} catch (HistoryException e) {
return this.definition;
return this.file;
return this.freetext;
return this.history;
return this.symbol;