Giter Site home page Giter Site logo

dc_fdw's Introduction

PostgreSQL - Document Collection Foreign Data Wrapper (dc_fdw)

This PostgreSQL extension implements a Foreign Data Wrapper (FDW) for the document collection on local disk.

More information can be found in the wiki page

###Building

No external library is needed.

###Limitations

Only these 4 types of quals and their boolean combinations can be pushed down:

1. id = <integer>
2. content @@ <term>
3. to_tsquery ( <tsquery text> )
4. plainto_tsquery ( <free text> )

Otherwise, a sequential scan on all the documents in the collection is expected.

###Usage

The following parameters can be set on a document collection foreign table:

data_dir      [where the files in a document collection are located]
index_dir     [where the index files are located: postings file, dictionary file]
index_method  [either In-memory(IM) Indexing or Single-pass in-memory(SPIM) indexing]
buffer_size   [when using SPIM indexing, this is the limit of memory available]
id_col        [the column name for mapping doc id]
text_col      [the column name for mapping doc content]

###Example

CREATE EXTENSION dc_fdw;

CREATE SERVER dc_server 
	FOREIGN DATA WRAPPER dc_fdw;

CREATE FOREIGN TABLE dc_table (id int, content text) 
	SERVER dc_server
	OPTIONS (
	    data_dir '/pgsql/postgres/contrib/dc_fdw/data/reuters/training', 
    	index_dir '/pgsql/postgres/contrib/dc_fdw/data/reuters/index',
    	index_method 'SPIM',
    	buffer_size '10',
    	id_col 'id',
    	text_col 'content'
    );

-- Zheng Yang
[email protected]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.