Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 132857 - SimpleSearchQueryEngine doesn't continue resursive search once a match is found.
Summary: SimpleSearchQueryEngine doesn't continue resursive search once a match is found.
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Marius Slavescu CLA
QA Contact:
URL:
Whiteboard: closed460
Keywords:
Depends on:
Blocks: 89341
  Show dependency tree
 
Reported: 2006-03-22 11:27 EST by Bianca Jiang CLA
Modified: 2016-05-05 11:21 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bianca Jiang CLA 2006-03-22 11:27:13 EST
Hi, Marius, as requested, I've checked in a JUnit test case for searching a Test execution result file using org.eclipse.hyades.models.hierarchy.util.internal.SimpleSearchQueryEngine. It's:
org.eclipse.hyades.use.cases\src\org\eclipse\hyades\use\cases\junit\models\test\TestLogSearchTest.java

The query was the same one we created together. The QueryResult returned contains one ResultEntry with an empty value.

Creating this defect for tracking this. Thanks!
Comment 1 Marius Slavescu CLA 2006-03-23 15:47:03 EST
I updated the testcase and the engine, please let me know if it works for all your scenarios.

You can add now the required paths through SimpleSearchQueryEngine.getRequiredPaths() (see the example in the testcase), this replaces the special IN expressions.
Comment 2 Bianca Jiang CLA 2006-03-24 00:01:26 EST
Just tried version 1.4 of TestLogSearchTest.java. The two test cases there works like a charm! So I just tried search for text and id fields (actually don't need to search fields(id) that's not user visible in my case), haven't tried the new required paths yet. It certainly looks very promising!  I'll add more test cases as I try more cases soon. Stay toned.

Thanks a ton for the quick turn around, Marius!
Comment 3 Bianca Jiang CLA 2006-03-29 11:41:38 EST
I updated TestLogSearchTest.java to version 1.5. It now has 4 test cases. 

First, I'd like to compliment the new API for required paths. It allows the tuning of the search scope very easily and efficiently. It's a great improvement to the search engine.

There are just two little problems I current have and they are reflected in the two test cases:

1) testSearchProperties(). The expected result for it is one verdict event. The search did find the event successfully, but the query results contains two references to the exactly same verdict instance. 

2) testSearchInvocationEvent(). The search result would be perfect if it can honor the case sensitive requirement. Maybe I didn't set the case sensitive properly? Please let me know.

Thanks!
Comment 4 Marius Slavescu CLA 2006-03-29 16:19:33 EST
I've added a way to control the pruning mechanism see an example in testSearchProperties by overriding SimpleSearchQueryEngine.usePruneSubtree() method.

You can get distinct values using query.setDistinct(true) althogh it is better if you avoid getting duplicated values in the first place by using the pruning mechanims.

Your testcase works fine now (you set case insensitive, used assertEquals with the wrong input), please add more scenarios and let me know if any of them fails.
Comment 5 Bianca Jiang CLA 2006-03-29 17:40:19 EST
query.setDistinct(true) also worked for me. Thanks.

The the test case for case sensitive is confusing. it is searching for "SUCCESSFUL" and is actually expecting a result of length 0, but 28 results returned.
BinaryExpression invocationEventSearch = createBinaryExpression(Common_TestprofilePackage.eINSTANCE.getTPFInvocationEvent_Status(), "SUCCESSFUL");
I've updated it as such.
Comment 6 Marius Slavescu CLA 2006-04-03 10:43:39 EDT
I'll close this, please reopen if you find any scenario that doesn't work.
Comment 7 Paul Slauenwhite CLA 2009-06-30 13:46:44 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.
Comment 8 Paul Slauenwhite CLA 2009-06-30 13:54:16 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.