lucene-c-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From roo...@apache.org
Subject svn commit: r178590 - in /incubator/lucene4c/branches/gcj-backend: include/lcn_query_parser.h src/query_parser/query_parser.cxx test/main.c
Date Thu, 26 May 2005 05:25:14 GMT
Author: rooneg
Date: Wed May 25 22:25:14 2005
New Revision: 178590

URL: http://svn.apache.org/viewcvs?rev=178590&view=rev
Log:
In retrospect, the query parser should take a string, not a field,
to describe the default field.  Don't know what i was thinking on
that one...

* include/lcn_query_parser.h
  (lcn_query_parse): take a field as a string.

* src/query_parser/query_parser.cxx
  (query_parse_baton): make the field a string.
  (query_parse_internal): convert field to a java string.
  (lcn_query_parse): field is now a string.

* test/main.c
  (main): don't bother creating a field, just pass in the name.

Modified:
    incubator/lucene4c/branches/gcj-backend/include/lcn_query_parser.h
    incubator/lucene4c/branches/gcj-backend/src/query_parser/query_parser.cxx
    incubator/lucene4c/branches/gcj-backend/test/main.c

Modified: incubator/lucene4c/branches/gcj-backend/include/lcn_query_parser.h
URL: http://svn.apache.org/viewcvs/incubator/lucene4c/branches/gcj-backend/include/lcn_query_parser.h?rev=178590&r1=178589&r2=178590&view=diff
==============================================================================
--- incubator/lucene4c/branches/gcj-backend/include/lcn_query_parser.h (original)
+++ incubator/lucene4c/branches/gcj-backend/include/lcn_query_parser.h Wed May 25 22:25:14
2005
@@ -25,7 +25,6 @@
 #include "lcn_pools.h"
 #include "lcn_error.h"
 #include "lcn_query.h"
-#include "lcn_field.h"
 #include "lcn_analyzer.h"
 
 #ifdef __cplusplus
@@ -44,7 +43,7 @@
 lcn_error_t *
 lcn_query_parse (lcn_query_t **query,
                  const char *input,
-                 lcn_field_t *field,
+                 const char *field,
                  lcn_analyzer_t *analyzer,
                  apr_pool_t *pool);
 

Modified: incubator/lucene4c/branches/gcj-backend/src/query_parser/query_parser.cxx
URL: http://svn.apache.org/viewcvs/incubator/lucene4c/branches/gcj-backend/src/query_parser/query_parser.cxx?rev=178590&r1=178589&r2=178590&view=diff
==============================================================================
--- incubator/lucene4c/branches/gcj-backend/src/query_parser/query_parser.cxx (original)
+++ incubator/lucene4c/branches/gcj-backend/src/query_parser/query_parser.cxx Wed May 25 22:25:14
2005
@@ -21,7 +21,6 @@
 #include "lcn_query_parser.h"
 
 #include "../search/query.hxx"
-#include "../document/field.hxx"
 #include "../analysis/analyzer.hxx"
 
 #include "../util/exception.h"
@@ -33,7 +32,7 @@
 struct query_parse_baton {
   lcn_query_t **query;
   const char *input;
-  lcn_field_t *field;
+  const char *field;
   lcn_analyzer_t *analyzer;
   apr_pool_t *pool;
 };
@@ -48,7 +47,7 @@
 
   jstring query = JvNewStringUTF (qpb->input);
 
-  jstring field = qpb->field->impl->name();
+  jstring field = JvNewStringUTF (qpb->field);
 
   (*qpb->query)->impl = QueryParserHack::parse(query,
                                                field,
@@ -58,7 +57,7 @@
 lcn_error_t *
 lcn_query_parse (lcn_query_t **query,
                  const char *input,
-                 lcn_field_t *field,
+                 const char *field,
                  lcn_analyzer_t *analyzer,
                  apr_pool_t *pool)
 {

Modified: incubator/lucene4c/branches/gcj-backend/test/main.c
URL: http://svn.apache.org/viewcvs/incubator/lucene4c/branches/gcj-backend/test/main.c?rev=178590&r1=178589&r2=178590&view=diff
==============================================================================
--- incubator/lucene4c/branches/gcj-backend/test/main.c (original)
+++ incubator/lucene4c/branches/gcj-backend/test/main.c Wed May 25 22:25:14 2005
@@ -61,13 +61,9 @@
   if (err)
     fprintf (stderr, "error opening searcher... %s\n", err->message);
 
-  err = lcn_field_text (&field, "contents", "lucene", pool);
-  if (err)
-    fprintf (stderr, "error creating field: %s\n", err->message);
-
   lcn_query_t *query;
 
-  err = lcn_query_parse (&query, "foo", field, analyzer, pool);
+  err = lcn_query_parse (&query, "foo", "contents", analyzer, pool);
   if (err)
     fprintf (stderr, "error parsing query\n");
 



Mime
View raw message