Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Searching on a string with multiple records of the same value, only brings back one #26

Open
roddy-cesoft opened this issue Jun 10, 2021 · 7 comments

Comments

@roddy-cesoft
Copy link

If I have 2 records with the field 'PINK' in them, when I search for 'pink', only one of them is returned.

@seanthomasdevlin
Copy link
Member

Hi Roddy, do you mean that you have 2 records with 'PINK' in the same column for both? Could it be that you have other search terms which omit one record. Please provide a sample, or more details. You could also double check the query that is generated from the DB performance page and include that.

@roddy-cesoft
Copy link
Author

svySeach.Z.-.Multiple.Search.Providers.mov
svySeach.Z.-.Only.Family.Name.mov

Here are two sample videos of searching with a single 'z'. The first uses multiple search providers, including the family name, and it is missing a few of the records. The second is when I remove the other search providers, leaving only family name and this works.

When you mention search terms that omit a record; I had considered the matching to be autonomous against each search provider passed in. Does this entail that not finding a value in a search provider can omit a record?

@paronne
Copy link
Member

paronne commented Jun 11, 2021

Hi Roddy,

hard to tell what is the issue. If you can share a sample solution where the issue can be reproduced we can investigate.
Few things you can check yourself, verify if there is any error in log (if something goes wrong the search may not run at all)

Also you can verify the query generated by the search by printing (after the search executes) databaseManager.getSQL(foundset) & databaseManager.getSQLParameters(foundset) for the form's foundset.

@roddy-cesoft
Copy link
Author

roddy-cesoft commented Jun 14, 2021 via email

@roddy-cesoft
Copy link
Author

roddy-cesoft commented Jun 14, 2021 via email

@seanthomasdevlin
Copy link
Member

Hi Roddy,

The search will use the same join as the relation defines. The criteria are the same when searching foreign tables: ALL search tokens must match ANY of the providers. If you can share the SQL which is generated and the data which is expected we can analyze any potential issues.

@paronne
Copy link
Member

paronne commented Jul 5, 2021

Hi Roddy

most likely the different result you see will be due to the Inner Join indeed. As Sean mentioned the search will use same join type as defined in the relation. Therefore changing the join type, or making use of a new relation with joinType = LEFT OUTER JOIN will solve your problem.

Regards,
Paolo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants