Good Morning,
I have a search routine that has to search for documents in a specific folder (or subfolders), but exclude specific subfolders.
Let's say this is my search…I want to find everything with the following criteria:
- Field name "Case #" on Template name "Template1" contains the case number
- Document was created between 2 dates
- Document is in "ROOT\Folder 1" (or subfolders), but not in subfolders A, D, G, N, R or W
This is what my search logic would be:
({[Template1]:[Case #]="%(CaseNumber)"} &
{LF:Name="*", Type="DB"} &
{LF:Created>="%(SearchStartDate)", Created<="%(SearchEndDate)"} &
{LF:LOOKIN="ROOT\Folder 1"})
- ({LF:LOOKIN="ROOT\Folder 1\Folder A"} |
{LF:LOOKIN="ROOT\Folder 1\Folder D"} |
{LF:LOOKIN="ROOT\Folder 1\Folder G"} |
{LF:LOOKIN="ROOT\Folder 1\Folder N"} |
{LF:LOOKIN="ROOT\Folder 1\Folder R"} |
{LF:LOOKIN="ROOT\Folder 1\Folder W"})
What I find, however is this search takes a while to complete (30 seconds to 2 minutes). This is after a LF reindex and SQL index re-creation, so I know it's not a back end issue, as other searches run significantly faster. The result set is not a large number of documents. Often 10 or less.
Is there a more optimal way to do this?