|
Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
|
A Tool for running Lucene jobs. More...
#include <lucene_tool.h>
Public Member Functions | |
| const LUCENE_TOOL_PREFIX char *LUCENE_ID_S | LUCENE_TOOL_VAL ("id") |
| The identifier used to uniquely specify a Lucene document. More... | |
| GRASSROOTS_LUCENE_API LuceneTool * | AllocateLuceneTool (GrassrootsServer *grassroots_p, uuid_t id) |
| Allocate a LuceneTool to run searches with. More... | |
| GRASSROOTS_LUCENE_API void | FreeLuceneTool (LuceneTool *tool_p) |
| Free a LuceneTool. More... | |
| GRASSROOTS_LUCENE_API bool | SearchLucene (LuceneTool *tool_p, const char *query_s, LinkedList *facets_p, const char *search_type_s, const uint32 page_index, const uint32 page_size, const QueryMode qm) |
| Run a Lucene Search. More... | |
| GRASSROOTS_LUCENE_API OperationStatus | IndexLucene (LuceneTool *tool_p, const json_t *data_p, bool update_flag) |
| Index data in Lucene. More... | |
| GRASSROOTS_LUCENE_API OperationStatus | DeleteLucene (LuceneTool *tool_p, const char *query_s, const QueryMode qm) |
| Delete data in Lucene. More... | |
| GRASSROOTS_LUCENE_API bool | SetLuceneToolOutput (LuceneTool *tool_p, char *output_s) |
| Set the name of the output file that the LuceneTool will write its results to. More... | |
Data Fields | |
| char * | lt_name_s |
| const char * | lt_index_class_s |
| const char * | lt_search_class_s |
| const char * | lt_delete_class_s |
| const char * | lt_classpath_s |
| const char * | lt_index_s |
| const char * | lt_taxonomy_s |
| const char * | lt_working_directory_s |
| const char * | lt_facet_key_s |
| char * | lt_output_file_s |
| uint32 | lt_num_total_hits |
| uint32 | lt_hits_from_index |
| uint32 | lt_hits_to_index |
| uuid_t | lt_id |
| LinkedList * | lt_facet_results_p |
A Tool for running Lucene jobs.
| const LUCENE_TOOL_PREFIX char *LUCENE_ID_S LUCENE_TOOL_VAL | ( | "id" | ) |
The identifier used to uniquely specify a Lucene document.
| GRASSROOTS_LUCENE_API LuceneTool * AllocateLuceneTool | ( | GrassrootsServer * | grassroots_p, |
| uuid_t | id | ||
| ) |
Allocate a LuceneTool to run searches with.
NULL upon error. | GRASSROOTS_LUCENE_API void FreeLuceneTool | ( | LuceneTool * | tool_p | ) |
Free a LuceneTool.
| tool_p | The LuceneTool to free. |
| GRASSROOTS_LUCENE_API bool SearchLucene | ( | LuceneTool * | tool_p, |
| const char * | query_s, | ||
| LinkedList * | facets_p, | ||
| const char * | search_type_s, | ||
| const uint32 | page_index, | ||
| const uint32 | page_size, | ||
| const QueryMode | qm | ||
| ) |
Run a Lucene Search.
| tool_p | The LuceneTool to run. |
| query_s | The query to run. |
| facets_p | An optional list of KeyValuePairNodes for facets to run with. This can be NULL |
true if the LuceneTool ran successfully, false otherwise. | GRASSROOTS_LUCENE_API OperationStatus IndexLucene | ( | LuceneTool * | tool_p, |
| const json_t * | data_p, | ||
| bool | update_flag | ||
| ) |
Index data in Lucene.
| tool_p | The LuceneTool to index with. |
| data_p | The data to index |
| update_flag | If this is true then add to the current index. If this false, then the index will be cleared before indexing the given data. |
| GRASSROOTS_LUCENE_API OperationStatus DeleteLucene | ( | LuceneTool * | tool_p, |
| const char * | query_s, | ||
| const QueryMode | qm | ||
| ) |
Delete data in Lucene.
| tool_p | The LuceneTool to index with. |
| query_s | The query to run for deleting matching documents |
| GRASSROOTS_LUCENE_API bool SetLuceneToolOutput | ( | LuceneTool * | tool_p, |
| char * | output_s | ||
| ) |
Set the name of the output file that the LuceneTool will write its results to.
The LuceneTool makes a copy of the specified filename so it does not need to remain in scope.
| tool_p | The LuceneTool to set the output file for. |
| output_s | The name of the output file |
true if the LuceneTool's output filename was updated successfully, false otherwise. | char* lt_name_s |
| const char* lt_index_class_s |
| const char* lt_search_class_s |
| const char* lt_delete_class_s |
| const char* lt_classpath_s |
| const char* lt_index_s |
| const char* lt_taxonomy_s |
| const char* lt_working_directory_s |
| const char* lt_facet_key_s |
| char* lt_output_file_s |
| uint32 lt_num_total_hits |
| uint32 lt_hits_from_index |
| uint32 lt_hits_to_index |
| uuid_t lt_id |
| LinkedList* lt_facet_results_p |