I am trying to implement searching a set of multiple words which include multiple parts. For example, we have these medical terminologies.
R Deep Transverse Metatarsal Ligament 4 GEODE
R Distal JointCapsule 1 GEODE
R Dorsal Calcaneocuboid Ligament GEODE
R Dorsal Carpometacarpal Ligament 2 GEODE
R Dorsal Cuboideavicular Ligament GEODE
R Dorsal Tarsometatarsal Ligament 5 GEODE
R Elbow Capsule GEODE
R F Distal JointCapsule 1 GEODE
R Fibular Collateral Bursa GEODE
R Fibular Collateral Ligament GEODE
R Fibular Ligament GEODE
User can enter search terms like this:
e.g., "R De Me Li" then this should find "R Deep Transverse Metatarsal Ligament 4 GEODE"
e.g., "Fi Colla" ==> "R Fibular Collateral Bursa GEODE", "R Fibular Collateral Ligament GEODE"
e.g., "bow ODE" ==> "R Elbow Capsule GEODE"
That is, even when user enters some portions of a word, it should find the answers. If there are multiple answers, it should show all. I appreciate your help in advance.
Added) Oh.. I forgot something.
e.g., "ral lar" ==> It shouldn't show "R Fibular Collateral Bursa GEODE" or "R Fibular Collateral Ligament GEODE" since the order of query words should be considered.
In addition, the spaces among the query words mean different words of each line (database).
The order of query words should be the same as the words of each line (database), but the query words could be shorter than the database words.
e.g., "R De Me 4" ==> "R Deep Transverse Metatarsal Ligament 4 GEODE" Where we can see that 'Metatarsal' and 'Ligament' include 'me', but the first match with 'Metatarsal' is fine, and 4 will be searched.
In addition, different combinations of query words can return the same result.
e,g.,
'Car' ==> 'R Dorsal Carpometacarpal Ligament 2 GEODE'
'Do Car' ==> 'R Dorsal Carpometacarpal Ligament 2 GEODE'
'R Do Carp' ==> 'R Dorsal Carpometacarpal Ligament 2 GEODE'
Note: no case-sensitive.