You may access the index of '-' and then access the strings before and after '-' separately.* Example:* Let's say that you have stored the contents of your texts in an array of string named *text* 1. text[i].length() gives you the length of a string 2. int index=text[i].indexOf('-') gives you the index at which '-' is found. 3. String str1 = text[i].substring(0,index) gives you the first term 4. String str2 = text[i].substring(index+1) gives you the second term.
Hope this can help you. - Tesfaye Guta On Wed, Jul 7, 2010 at 2:04 PM, sarfaraz masood < sarfarazmasood2...@yahoo.com> wrote: > There are terms in my data like : one-way , separated by '-' , now > the > problem is that the standard analyzer is considering these > as a single term > instead of two. but i need that these should be > stored as two terms in the > index.. but how to do this ?? > > Sarfaraz > >