我正在开发一组查询,以从自由文本输入中找到规范的产品描述。考虑以下说明我的问题的示例:
(* Where: (a) Free text (b) Should have returned (c) What was found)
- (a) 'CUTTER FLOOR90 CM DUPLEX - IRWIN'
- (b) 'CUTTER F/FLOOR/AZULEJ.90CM DUPLEX 0096'
- (c) 'CUTTER FLOOR65 CM DUPLEX - IRWIN'
- (a) 'WELDABLE GLOVE 50MM - TIGER'
- (b) 'LUVA . WELD BROWN 826 TIGER(50MM)'
- (c) 'WELDABLE GLOVE 40MM - TIGER'
- (a) 'INSULATION TAPE 33+ SCOTCH 19X10M - 3M'
- (b) 'INSUL. TAPE.PVC PT 19MMX10M N.33+ H00018'
- (c) 'INSULATION TAPE HIGHLAND 19X05M - 3M'
- (a) 'KEY COMBINATION 14MM - GEDORE'
- (b) 'KEY COMB. 14MM CV. 002509 002509 1'
- (c) 'KEY COMBINATION 10MM - GEDORE'
如您所见,查询返回的字符串作为一个整体匹配得更紧密。我需要提高子字符串的重要性,例如 (\d+)MM 或 (\d+)CM。
你会怎么做,最好是使用 Solr?