Can't find specific text when searching in a project

Oxygen general issues.
icheissejen
Posts: 5
Joined: Fri Sep 23, 2022 3:07 pm

Can't find specific text when searching in a project

Post by icheissejen »

I set up a project and added a couple of folders in it. When I do a search in the project for this specific combination of words, there are no results even though the words exist in the dita files in those folders.
The text to find is "Order Management Cloud." (searching without the period, of course) In my first attempt, I didn't select other options like case sensitive or whole words only. But even when I do select those options, zero results.
But when you do a search of "Management Cloud," you get results. Could anyone shed light on this?
This only happens in a project setting. If you do a Find/Replace in Files using a specified path, it works.

And a weird thing also is that I have another project folder where I include the production folder I want to search in AND a testing folder that contains dita files where the text "Order Management Cloud" exists. If I do a Find/Replace in Files for that text, it returns the files containing the text that's in the testing folder but not the ones in the production folder.

I'm aware I could just do a Find/Replace using a specified path. But I do want some help with this issue because it's weird that it doesn't work. I would really appreciate it if anyone could figure out what's going on. Thank you!

This is the project file:
<?xml version="1.0" encoding="UTF-8"?>
<project>
<meta>
<filters directoryPatterns="" filePatterns="\Qtest.xpr\E" positiveFilePatterns="" showHiddenFiles="false"/>
<options/>
</meta>
<projectTree name="test.xpr">
<folder path="testfolder/"/>
<folder path="productionfolder/"/>
</projectTree>
</project>
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Can't find specific text when searching in a project

Post by adrian »

Hi,

What version of Oxygen are you using?

First make sure that the Filters section has Include files: set to *.*.
Considering that you are searching for three rather long words separated by space, "Order Management Cloud", it's quite possible that they are not always grouped together on the same line if you look in the raw XML file (Text mode), meaning there could be a line break, or maybe multiple spaces between any two of them.
There is one option that makes a significant difference in this case, Ignore extra whitespaces. If you enable this option the search knows to ignore the line breaks, indents and and any other white spaces between these words.

To show you an example.
Given the paragraph with a line break :

Code: Select all

        <p>Order 
            Management Cloud</p>
If you search for "Order Management Cloud" with no options checked, you get no results. But if you search for "Management Cloud" you will find it (words are separated by just one space).
If you search for "Order Management Cloud" with [x] Ignore extra whitespaces, you will also find it.

Note that if any of the three words is somehow tagged (italicized, bold, etc), the search will not find the three words, because they are no longer separated just by spaces.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
icheissejen
Posts: 5
Joined: Fri Sep 23, 2022 3:07 pm

Re: Can't find specific text when searching in a project

Post by icheissejen »

Hi Adrian, thanks for the advice about selecting "Ignore extra whitespaces." Doing this alone found the words we're looking for. I did add *.* to the list of filters.

Appreciate your explanation as well. I didn't think about that.
Post Reply