Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.2
    • Fix Version/s: 3.1.1
    • Component/s: imixs-engine
    • Labels:
      None

      Description

      We need a feature to limit the search result.
      currently the serach retuns up to 1000 workitems. This can take a lot of time to load them from the database.

      In lucene there seams to be a differnt betwenn serach(query,limit)
      and the toDocs.scoreDocs.size()
      !!!
      We need to test this in detail.

      some workarround:

      
          // parser.setDefaultOperator(Operator.AND);
                      TopDocs topDocs = searcher.search(parser.parse(sSearchTerm),
                              1000);
      
                      logger.fine("  total hits=" + topDocs.totalHits);
      
                      // Get an array of references to matched documents
                      ScoreDoc[] scoreDosArray = topDocs.scoreDocs;
                      for (ScoreDoc scoredoc : scoreDosArray) {
                          // Retrieve the matched document and show relevant details
                          Document doc = searcher.doc(scoredoc.doc);
      
                          String sID = doc.get("$uniqueid");
                          logger.fine("  lucene $uniqueid=" + sID);
                          ItemCollection itemCol = workflowService.getEntityService()
                                  .load(sID);
                          if (itemCol != null) {
                              workitems.add(itemCol);
                          }
                         
                          if (workitems.size()>=MAX_SEARCH_RESULT)
                              break;
                      }
      
      
      

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            rsoika
            Reporter:
            rsoika
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: