Amit Langote
amitl****@gmail*****
2013年 10月 3日 (木) 19:34:12 JST
On Thu, Oct 3, 2013 at 7:28 PM, Fujii Masao <masao****@gmail*****> wrote: > On Thu, Oct 3, 2013 at 5:52 PM, Amit Langote <amitl****@gmail*****> wrote: >> On Thu, Oct 3, 2013 at 5:41 PM, Fujii Masao <masao****@gmail*****> wrote: >> >>>> So the way to make similarity function case-insensitive would be to change >>>> generate_bigm and not the similarity code itself. Also, the change will make >>>> the show_bigm function behave differently. >>> >>> Yes, generate_bigm would need to be updated to make bigm_similarity >>> case-sensitive. >>> >>> *From a user point of view*, bigm_similarity() and upcoming similarity >>> search should be case-sensitive? If yes, we should change generate_bigm, >>> but its change must not affect the behavior of the full-text search at all. >>> >>> Or we should just implement both case-sensitive and -insensitive >>> bigm_similarity() and similarity search? >>> >>> Thought? >> >> Could we say that case-sensitivity applies more to the comparison >> functions as in strcmp() vs strcmpi() than similarity() function? What >> do you think? > > It depends the whole design of the full-text (similarity) search, I think. > For example, pg_trgm's comparison function is case-*sensitive*. > Its generate_trgm function is case-*insensitive*. > How about make generate_bigm() accept a case sensitivity parameter? We could make some parts case-sensitive (text matching) while other parts case-insensitive (similarity())? What do you think? -- Amit