Class: Relevanced::Processor
- Inherits:
-
Object
- Object
- Relevanced::Processor
- Includes:
- Thrift::Processor
- Defined in:
- lib/gen-rb/relevanced.rb
Instance Method Summary collapse
- #process_addDocumentsToCentroid(seqid, iprot, oprot) ⇒ Object
- #process_createCentroid(seqid, iprot, oprot) ⇒ Object
- #process_createDocument(seqid, iprot, oprot) ⇒ Object
- #process_createDocumentWithID(seqid, iprot, oprot) ⇒ Object
- #process_debugEraseAllData(seqid, iprot, oprot) ⇒ Object
- #process_debugGetFullCentroid(seqid, iprot, oprot) ⇒ Object
- #process_debugGetFullProcessedDocument(seqid, iprot, oprot) ⇒ Object
- #process_deleteCentroid(seqid, iprot, oprot) ⇒ Object
- #process_deleteDocument(seqid, iprot, oprot) ⇒ Object
- #process_getCentroidSimilarity(seqid, iprot, oprot) ⇒ Object
- #process_getDocumentMetadata(seqid, iprot, oprot) ⇒ Object
- #process_getDocumentSimilarity(seqid, iprot, oprot) ⇒ Object
- #process_getServerMetadata(seqid, iprot, oprot) ⇒ Object
- #process_getTextSimilarity(seqid, iprot, oprot) ⇒ Object
- #process_joinCentroid(seqid, iprot, oprot) ⇒ Object
- #process_listAllCentroids(seqid, iprot, oprot) ⇒ Object
- #process_listAllDocuments(seqid, iprot, oprot) ⇒ Object
- #process_listAllDocumentsForCentroid(seqid, iprot, oprot) ⇒ Object
- #process_listCentroidDocumentRange(seqid, iprot, oprot) ⇒ Object
- #process_listCentroidDocumentRangeFromID(seqid, iprot, oprot) ⇒ Object
- #process_listCentroidRange(seqid, iprot, oprot) ⇒ Object
- #process_listCentroidRangeFromID(seqid, iprot, oprot) ⇒ Object
- #process_listDocumentRange(seqid, iprot, oprot) ⇒ Object
- #process_listDocumentRangeFromID(seqid, iprot, oprot) ⇒ Object
- #process_listUnusedDocuments(seqid, iprot, oprot) ⇒ Object
- #process_multiCreateCentroids(seqid, iprot, oprot) ⇒ Object
- #process_multiDeleteCentroids(seqid, iprot, oprot) ⇒ Object
- #process_multiDeleteDocuments(seqid, iprot, oprot) ⇒ Object
- #process_multiGetDocumentSimilarity(seqid, iprot, oprot) ⇒ Object
- #process_multiGetTextSimilarity(seqid, iprot, oprot) ⇒ Object
- #process_multiJoinCentroids(seqid, iprot, oprot) ⇒ Object
- #process_ping(seqid, iprot, oprot) ⇒ Object
- #process_removeDocumentsFromCentroid(seqid, iprot, oprot) ⇒ Object
Instance Method Details
#process_addDocumentsToCentroid(seqid, iprot, oprot) ⇒ Object
736 737 738 739 740 741 742 743 744 745 746 747 748 749 |
# File 'lib/gen-rb/relevanced.rb', line 736 def process_addDocumentsToCentroid(seqid, iprot, oprot) args = read_args(iprot, AddDocumentsToCentroid_args) result = AddDocumentsToCentroid_result.new() begin result.success = @handler.addDocumentsToCentroid(args.request) rescue ::ECentroidDoesNotExist => centroidErr result.centroidErr = centroidErr rescue ::EDocumentDoesNotExist => docErr result.docErr = docErr rescue ::EDocumentAlreadyInCentroid => bothErr result.bothErr = bothErr end write_result(result, oprot, 'addDocumentsToCentroid', seqid) end |
#process_createCentroid(seqid, iprot, oprot) ⇒ Object
692 693 694 695 696 697 698 699 700 701 |
# File 'lib/gen-rb/relevanced.rb', line 692 def process_createCentroid(seqid, iprot, oprot) args = read_args(iprot, CreateCentroid_args) result = CreateCentroid_result.new() begin result.success = @handler.createCentroid(args.request) rescue ::ECentroidAlreadyExists => err result.err = err end write_result(result, oprot, 'createCentroid', seqid) end |
#process_createDocument(seqid, iprot, oprot) ⇒ Object
613 614 615 616 617 618 |
# File 'lib/gen-rb/relevanced.rb', line 613 def process_createDocument(seqid, iprot, oprot) args = read_args(iprot, CreateDocument_args) result = CreateDocument_result.new() result.success = @handler.createDocument(args.text, args.language) write_result(result, oprot, 'createDocument', seqid) end |
#process_createDocumentWithID(seqid, iprot, oprot) ⇒ Object
620 621 622 623 624 625 626 627 628 629 |
# File 'lib/gen-rb/relevanced.rb', line 620 def process_createDocumentWithID(seqid, iprot, oprot) args = read_args(iprot, CreateDocumentWithID_args) result = CreateDocumentWithID_result.new() begin result.success = @handler.createDocumentWithID(args.id, args.text, args.language) rescue ::EDocumentAlreadyExists => err result.err = err end write_result(result, oprot, 'createDocumentWithID', seqid) end |
#process_debugEraseAllData(seqid, iprot, oprot) ⇒ Object
842 843 844 845 846 847 |
# File 'lib/gen-rb/relevanced.rb', line 842 def process_debugEraseAllData(seqid, iprot, oprot) args = read_args(iprot, DebugEraseAllData_args) result = DebugEraseAllData_result.new() @handler.debugEraseAllData() write_result(result, oprot, 'debugEraseAllData', seqid) end |
#process_debugGetFullCentroid(seqid, iprot, oprot) ⇒ Object
849 850 851 852 853 854 855 856 857 858 |
# File 'lib/gen-rb/relevanced.rb', line 849 def process_debugGetFullCentroid(seqid, iprot, oprot) args = read_args(iprot, DebugGetFullCentroid_args) result = DebugGetFullCentroid_result.new() begin result.success = @handler.debugGetFullCentroid(args.centroidId) rescue ::ECentroidDoesNotExist => err result.err = err end write_result(result, oprot, 'debugGetFullCentroid', seqid) end |
#process_debugGetFullProcessedDocument(seqid, iprot, oprot) ⇒ Object
860 861 862 863 864 865 866 867 868 869 |
# File 'lib/gen-rb/relevanced.rb', line 860 def process_debugGetFullProcessedDocument(seqid, iprot, oprot) args = read_args(iprot, DebugGetFullProcessedDocument_args) result = DebugGetFullProcessedDocument_result.new() begin result.success = @handler.debugGetFullProcessedDocument(args.documentId) rescue ::EDocumentDoesNotExist => err result.err = err end write_result(result, oprot, 'debugGetFullProcessedDocument', seqid) end |
#process_deleteCentroid(seqid, iprot, oprot) ⇒ Object
714 715 716 717 718 719 720 721 722 723 |
# File 'lib/gen-rb/relevanced.rb', line 714 def process_deleteCentroid(seqid, iprot, oprot) args = read_args(iprot, DeleteCentroid_args) result = DeleteCentroid_result.new() begin result.success = @handler.deleteCentroid(args.request) rescue ::ECentroidDoesNotExist => err result.err = err end write_result(result, oprot, 'deleteCentroid', seqid) end |
#process_deleteDocument(seqid, iprot, oprot) ⇒ Object
631 632 633 634 635 636 637 638 639 640 |
# File 'lib/gen-rb/relevanced.rb', line 631 def process_deleteDocument(seqid, iprot, oprot) args = read_args(iprot, DeleteDocument_args) result = DeleteDocument_result.new() begin result.success = @handler.deleteDocument(args.request) rescue ::EDocumentDoesNotExist => err result.err = err end write_result(result, oprot, 'deleteDocument', seqid) end |
#process_getCentroidSimilarity(seqid, iprot, oprot) ⇒ Object
602 603 604 605 606 607 608 609 610 611 |
# File 'lib/gen-rb/relevanced.rb', line 602 def process_getCentroidSimilarity(seqid, iprot, oprot) args = read_args(iprot, GetCentroidSimilarity_args) result = GetCentroidSimilarity_result.new() begin result.success = @handler.getCentroidSimilarity(args.centroid1Id, args.centroid2Id) rescue ::ECentroidDoesNotExist => err result.err = err end write_result(result, oprot, 'getCentroidSimilarity', seqid) end |
#process_getDocumentMetadata(seqid, iprot, oprot) ⇒ Object
653 654 655 656 657 658 659 660 661 662 |
# File 'lib/gen-rb/relevanced.rb', line 653 def process_getDocumentMetadata(seqid, iprot, oprot) args = read_args(iprot, GetDocumentMetadata_args) result = GetDocumentMetadata_result.new() begin result.success = @handler.getDocumentMetadata(args.id) rescue ::EDocumentDoesNotExist => err result.err = err end write_result(result, oprot, 'getDocumentMetadata', seqid) end |
#process_getDocumentSimilarity(seqid, iprot, oprot) ⇒ Object
554 555 556 557 558 559 560 561 562 563 564 565 |
# File 'lib/gen-rb/relevanced.rb', line 554 def process_getDocumentSimilarity(seqid, iprot, oprot) args = read_args(iprot, GetDocumentSimilarity_args) result = GetDocumentSimilarity_result.new() begin result.success = @handler.getDocumentSimilarity(args.centroidId, args.docId) rescue ::ECentroidDoesNotExist => centroidErr result.centroidErr = centroidErr rescue ::EDocumentDoesNotExist => docErr result.docErr = docErr end write_result(result, oprot, 'getDocumentSimilarity', seqid) end |
#process_getServerMetadata(seqid, iprot, oprot) ⇒ Object
547 548 549 550 551 552 |
# File 'lib/gen-rb/relevanced.rb', line 547 def process_getServerMetadata(seqid, iprot, oprot) args = read_args(iprot, GetServerMetadata_args) result = GetServerMetadata_result.new() result.success = @handler.getServerMetadata() write_result(result, oprot, 'getServerMetadata', seqid) end |
#process_getTextSimilarity(seqid, iprot, oprot) ⇒ Object
580 581 582 583 584 585 586 587 588 589 |
# File 'lib/gen-rb/relevanced.rb', line 580 def process_getTextSimilarity(seqid, iprot, oprot) args = read_args(iprot, GetTextSimilarity_args) result = GetTextSimilarity_result.new() begin result.success = @handler.getTextSimilarity(args.centroidId, args.text, args.lang) rescue ::ECentroidDoesNotExist => err result.err = err end write_result(result, oprot, 'getTextSimilarity', seqid) end |
#process_joinCentroid(seqid, iprot, oprot) ⇒ Object
766 767 768 769 770 771 772 773 774 775 |
# File 'lib/gen-rb/relevanced.rb', line 766 def process_joinCentroid(seqid, iprot, oprot) args = read_args(iprot, JoinCentroid_args) result = JoinCentroid_result.new() begin result.success = @handler.joinCentroid(args.request) rescue ::ECentroidDoesNotExist => err result.err = err end write_result(result, oprot, 'joinCentroid', seqid) end |
#process_listAllCentroids(seqid, iprot, oprot) ⇒ Object
788 789 790 791 792 793 |
# File 'lib/gen-rb/relevanced.rb', line 788 def process_listAllCentroids(seqid, iprot, oprot) args = read_args(iprot, ListAllCentroids_args) result = ListAllCentroids_result.new() result.success = @handler.listAllCentroids() write_result(result, oprot, 'listAllCentroids', seqid) end |
#process_listAllDocuments(seqid, iprot, oprot) ⇒ Object
664 665 666 667 668 669 |
# File 'lib/gen-rb/relevanced.rb', line 664 def process_listAllDocuments(seqid, iprot, oprot) args = read_args(iprot, ListAllDocuments_args) result = ListAllDocuments_result.new() result.success = @handler.listAllDocuments() write_result(result, oprot, 'listAllDocuments', seqid) end |
#process_listAllDocumentsForCentroid(seqid, iprot, oprot) ⇒ Object
809 810 811 812 813 814 815 816 817 818 |
# File 'lib/gen-rb/relevanced.rb', line 809 def process_listAllDocumentsForCentroid(seqid, iprot, oprot) args = read_args(iprot, ListAllDocumentsForCentroid_args) result = ListAllDocumentsForCentroid_result.new() begin result.success = @handler.listAllDocumentsForCentroid(args.centroidId) rescue ::ECentroidDoesNotExist => err result.err = err end write_result(result, oprot, 'listAllDocumentsForCentroid', seqid) end |
#process_listCentroidDocumentRange(seqid, iprot, oprot) ⇒ Object
820 821 822 823 824 825 826 827 828 829 |
# File 'lib/gen-rb/relevanced.rb', line 820 def process_listCentroidDocumentRange(seqid, iprot, oprot) args = read_args(iprot, ListCentroidDocumentRange_args) result = ListCentroidDocumentRange_result.new() begin result.success = @handler.listCentroidDocumentRange(args.centroidId, args.offset, args.count) rescue ::ECentroidDoesNotExist => err result.err = err end write_result(result, oprot, 'listCentroidDocumentRange', seqid) end |
#process_listCentroidDocumentRangeFromID(seqid, iprot, oprot) ⇒ Object
831 832 833 834 835 836 837 838 839 840 |
# File 'lib/gen-rb/relevanced.rb', line 831 def process_listCentroidDocumentRangeFromID(seqid, iprot, oprot) args = read_args(iprot, ListCentroidDocumentRangeFromID_args) result = ListCentroidDocumentRangeFromID_result.new() begin result.success = @handler.listCentroidDocumentRangeFromID(args.centroidId, args.documentId, args.count) rescue ::ECentroidDoesNotExist => err result.err = err end write_result(result, oprot, 'listCentroidDocumentRangeFromID', seqid) end |
#process_listCentroidRange(seqid, iprot, oprot) ⇒ Object
795 796 797 798 799 800 |
# File 'lib/gen-rb/relevanced.rb', line 795 def process_listCentroidRange(seqid, iprot, oprot) args = read_args(iprot, ListCentroidRange_args) result = ListCentroidRange_result.new() result.success = @handler.listCentroidRange(args.offset, args.count) write_result(result, oprot, 'listCentroidRange', seqid) end |
#process_listCentroidRangeFromID(seqid, iprot, oprot) ⇒ Object
802 803 804 805 806 807 |
# File 'lib/gen-rb/relevanced.rb', line 802 def process_listCentroidRangeFromID(seqid, iprot, oprot) args = read_args(iprot, ListCentroidRangeFromID_args) result = ListCentroidRangeFromID_result.new() result.success = @handler.listCentroidRangeFromID(args.centroidId, args.count) write_result(result, oprot, 'listCentroidRangeFromID', seqid) end |
#process_listDocumentRange(seqid, iprot, oprot) ⇒ Object
678 679 680 681 682 683 |
# File 'lib/gen-rb/relevanced.rb', line 678 def process_listDocumentRange(seqid, iprot, oprot) args = read_args(iprot, ListDocumentRange_args) result = ListDocumentRange_result.new() result.success = @handler.listDocumentRange(args.offset, args.count) write_result(result, oprot, 'listDocumentRange', seqid) end |
#process_listDocumentRangeFromID(seqid, iprot, oprot) ⇒ Object
685 686 687 688 689 690 |
# File 'lib/gen-rb/relevanced.rb', line 685 def process_listDocumentRangeFromID(seqid, iprot, oprot) args = read_args(iprot, ListDocumentRangeFromID_args) result = ListDocumentRangeFromID_result.new() result.success = @handler.listDocumentRangeFromID(args.documentId, args.count) write_result(result, oprot, 'listDocumentRangeFromID', seqid) end |
#process_listUnusedDocuments(seqid, iprot, oprot) ⇒ Object
671 672 673 674 675 676 |
# File 'lib/gen-rb/relevanced.rb', line 671 def process_listUnusedDocuments(seqid, iprot, oprot) args = read_args(iprot, ListUnusedDocuments_args) result = ListUnusedDocuments_result.new() result.success = @handler.listUnusedDocuments(args.limit) write_result(result, oprot, 'listUnusedDocuments', seqid) end |
#process_multiCreateCentroids(seqid, iprot, oprot) ⇒ Object
703 704 705 706 707 708 709 710 711 712 |
# File 'lib/gen-rb/relevanced.rb', line 703 def process_multiCreateCentroids(seqid, iprot, oprot) args = read_args(iprot, MultiCreateCentroids_args) result = MultiCreateCentroids_result.new() begin result.success = @handler.multiCreateCentroids(args.request) rescue ::ECentroidAlreadyExists => err result.err = err end write_result(result, oprot, 'multiCreateCentroids', seqid) end |
#process_multiDeleteCentroids(seqid, iprot, oprot) ⇒ Object
725 726 727 728 729 730 731 732 733 734 |
# File 'lib/gen-rb/relevanced.rb', line 725 def process_multiDeleteCentroids(seqid, iprot, oprot) args = read_args(iprot, MultiDeleteCentroids_args) result = MultiDeleteCentroids_result.new() begin result.success = @handler.multiDeleteCentroids(args.request) rescue ::ECentroidDoesNotExist => err result.err = err end write_result(result, oprot, 'multiDeleteCentroids', seqid) end |
#process_multiDeleteDocuments(seqid, iprot, oprot) ⇒ Object
642 643 644 645 646 647 648 649 650 651 |
# File 'lib/gen-rb/relevanced.rb', line 642 def process_multiDeleteDocuments(seqid, iprot, oprot) args = read_args(iprot, MultiDeleteDocuments_args) result = MultiDeleteDocuments_result.new() begin result.success = @handler.multiDeleteDocuments(args.request) rescue ::EDocumentDoesNotExist => err result.err = err end write_result(result, oprot, 'multiDeleteDocuments', seqid) end |
#process_multiGetDocumentSimilarity(seqid, iprot, oprot) ⇒ Object
567 568 569 570 571 572 573 574 575 576 577 578 |
# File 'lib/gen-rb/relevanced.rb', line 567 def process_multiGetDocumentSimilarity(seqid, iprot, oprot) args = read_args(iprot, MultiGetDocumentSimilarity_args) result = MultiGetDocumentSimilarity_result.new() begin result.success = @handler.multiGetDocumentSimilarity(args.centroidIds, args.documentId) rescue ::ECentroidDoesNotExist => centroidErr result.centroidErr = centroidErr rescue ::EDocumentDoesNotExist => docErr result.docErr = docErr end write_result(result, oprot, 'multiGetDocumentSimilarity', seqid) end |
#process_multiGetTextSimilarity(seqid, iprot, oprot) ⇒ Object
591 592 593 594 595 596 597 598 599 600 |
# File 'lib/gen-rb/relevanced.rb', line 591 def process_multiGetTextSimilarity(seqid, iprot, oprot) args = read_args(iprot, MultiGetTextSimilarity_args) result = MultiGetTextSimilarity_result.new() begin result.success = @handler.multiGetTextSimilarity(args.centroidIds, args.text, args.lang) rescue ::ECentroidDoesNotExist => err result.err = err end write_result(result, oprot, 'multiGetTextSimilarity', seqid) end |
#process_multiJoinCentroids(seqid, iprot, oprot) ⇒ Object
777 778 779 780 781 782 783 784 785 786 |
# File 'lib/gen-rb/relevanced.rb', line 777 def process_multiJoinCentroids(seqid, iprot, oprot) args = read_args(iprot, MultiJoinCentroids_args) result = MultiJoinCentroids_result.new() begin result.success = @handler.multiJoinCentroids(args.request) rescue ::ECentroidDoesNotExist => err result.err = err end write_result(result, oprot, 'multiJoinCentroids', seqid) end |
#process_ping(seqid, iprot, oprot) ⇒ Object
540 541 542 543 544 545 |
# File 'lib/gen-rb/relevanced.rb', line 540 def process_ping(seqid, iprot, oprot) args = read_args(iprot, Ping_args) result = Ping_result.new() @handler.ping() write_result(result, oprot, 'ping', seqid) end |
#process_removeDocumentsFromCentroid(seqid, iprot, oprot) ⇒ Object
751 752 753 754 755 756 757 758 759 760 761 762 763 764 |
# File 'lib/gen-rb/relevanced.rb', line 751 def process_removeDocumentsFromCentroid(seqid, iprot, oprot) args = read_args(iprot, RemoveDocumentsFromCentroid_args) result = RemoveDocumentsFromCentroid_result.new() begin result.success = @handler.removeDocumentsFromCentroid(args.request) rescue ::ECentroidDoesNotExist => centroidErr result.centroidErr = centroidErr rescue ::EDocumentDoesNotExist => docErr result.docErr = docErr rescue ::EDocumentNotInCentroid => bothErr result.bothErr = bothErr end write_result(result, oprot, 'removeDocumentsFromCentroid', seqid) end |