Giter Site home page Giter Site logo

marcosvidolin / doco Goto Github PK

View Code? Open in Web Editor NEW
16.0 5.0 6.0 103 KB

Doco - Document Converter for Google App Engine Search API

License: MIT License

Java 100.00%
google gae app-engine-search-api search-api document search google-appengine java doco document-converter

doco's Introduction

doco's People

Contributors

iiredalert avatar jamhuang avatar marcosvidolin avatar tj-recess avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

doco's Issues

Support for Polymorphic types

My hierarchy looks like this:

@DocumentIndex
abstract class X {
@DocumentId
private long id;
}

@DocumentIndex
class Y extends X {
  // some fields
}

I'm trying to create a Document from an instance of class Y like below:

X obj = new Y();
Document advertisementDocument = doco.toDocument(obj);

Above code throws exception:
"com.vidolima.doco.exception.DocumentParseException: No @documentid annotation was found in class com.myapp.Y".

Integration with Objectify

I think we should build Doco on top of Objectify. Converting POJO to Document is necessary but converting Document back to POJO is kind of useless because we don't have all the fields in Document. On the other hand, if we integrate Doco with Objectify, we can do following:

  • Convert Ofy Entity (only) to Documents with Entity's Key<?> being the documentId.
  • Retrieve entire Entity back by just accessing the key from document (reconstruction is easier).
  • Converting various other fields to text (Ref, Set, List, etc) which are good to be searched but can't be reconstructed back into POJO. Since we're using Key to retrieve things back, just one-way conversion (from pojo to doc) is enough.
  • Less new annotations to learn if we integrate with Ofy's annotations. (e.g. @entity(enableFullTextSearch=true), etc).

Since, Ofy is used extensively already, we can hope for much higher adoption (and contribution) which will make doco even better.

Let me know your thoughts on this.

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.