User 4e4b708dbd
09-01-2008 09:46:33
This must have been covered in documentation somewhere or discussed in forums but I have been unable to find an answer. So the problem is as follows:
I want to perform a similarity search and display results ordered by similarity. What is the best way to do it with the cartridge?
ChemAxon aa7c50abf8
09-01-2008 11:38:27
Currently, the only way to do it is using the ORDER BY clause similarily to the following:
Code: |
select id, jc_tanimoto(structure, 'Brc1ccccc1') sim from nci_1k order by sim |
If you also need to apply a filter based on the similarity value:
Code: |
select id, sim from (select id, jc_tanimoto(structure, 'Brc1ccccc1') sim from nci_1k) where sim > 0.2 order by sim |
Note, that the Oracle optimizer will be smart enough to use a domain-index scan in the latter case.
ChemAxon aa7c50abf8
30-01-2008 11:34:44
jc_tanimotob is implemented for this purpose.
ChemAxon aa7c50abf8
30-01-2008 12:11:58