elasticsearch-analysis-synonym icon indicating copy to clipboard operation
elasticsearch-analysis-synonym copied to clipboard

EdgeNgramm analisys synonym plugin

Open Bklara opened this issue 8 years ago • 0 comments

I've never create a plugins for elastic before, and i am only python developer. I want to add some functionality for this. Change ngram to edgeNgram is very usefull, for search suggestings.

public MyToken(char[] key, int startOffset, int endOffset, int posInc,
                BytesRef output, boolean ignoreCase) {
            this.word = ignoreCase ? new String(key, startOffset, endOffset
                    - startOffset).toLowerCase() : new String(key, startOffset,
                    endOffset - startOffset);
            this.startOffset = startOffset;
            this.endOffset = endOffset;
            this.posInc = posInc;
            this.output = output;
            this.seq = 0; // zero for seq means that this token is the original of synonyms
        }

        public MyToken(String word, int startOffset, int endOffset, int posInc) {
            this(word, startOffset, endOffset, posInc, Integer.MAX_VALUE); // Integer.MAX_VALUE for seq means unused
        }

        public MyToken(String word, int startOffset, int endOffset, int posInc,
                int seq) {
            this.word = word;
            this.startOffset = startOffset;
            this.endOffset = endOffset;
            this.posInc = posInc;
            this.output = null; // means unused
            this.seq = seq;
        }



Could you give me advise?

Bklara avatar Jul 20 '17 15:07 Bklara