Query parser Exception ---------------------- Key: LUCENENET-367 URL: https://issues.apache.org/jira/browse/LUCENENET-367 Project: Lucene.Net Issue Type: Bug Environment: Windows XP 2005 Reporter: maimoona khan
I m working on my my project related to my BS degree. i m using Lucene.net for indexing and searching files.now when i wanna search fies ,an exception occurs for query parser.and exception is " Encountered "<EOF>" at line 1, column 0. Was expecting one of: <NOT> ... "+" ... "-" ... "(" ... <QUOTED> ... <TERM> ... <PREFIXTERM> ... <WILDTERM> ... "[" ... "{" ... <NUMBER> ... " I dont understand what is this? i m also providind the code below .please help me beecause my whole project is based on this module.\ the code is below : public void search() { Form1 frm = new Form1(); frm.listfiles.Items.Clear(); MessageBox.Show("running"); Query query = QueryParser.Parse(frm.txtsearch.Text,"text", new StandardAnalyzer()); MessageBox.Show(query.ToString()); Hits hits = searcher.Search(query); for (int i = 0; i < hits.Length(); i++) { // get the document from index Document doc = hits.Doc(i); // create a new row with the result data string filename = doc.Get("title"); string path = doc.Get("path"); string folder = Path.GetDirectoryName(path); DirectoryInfo di = new DirectoryInfo(folder); ListViewItem item = new ListViewItem(new string[] { null, filename, di.Name, hits.Score(i).ToString() }); item.Tag = path; item.ImageIndex = imageListDocuments.IconIndex(filename); frm.listfiles.Items.Add(item); Application.DoEvents(); } searcher.Close(); } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.