Coder Social home page Coder Social logo

skilltracker-app's Introduction

SkillTracker-App

Spring

  1. Download Spring Tool Suite from https://spring.io/tools/sts/all
  2. Install Apahce Maven
  3. Import project in STS
  4. Run as a Spring Boot App

Solr

  1. Download and install Java 8+ if not done already
  2. Download apache solr 7.3.1
  3. Unpack downloaded zip
  4. Navigate to bin folder
  5. Run solr start
  6. Run solr create -c <core-name>. This will create a folder in your solr directory \server\solr\<core-name>
  7. Create a folder in the root solr directory to store necessary .jar files. ie) .\jarfiles
  8. In directory ./dist copy solr-dataimporthandler-7.3.1.jar and solr-dataimporthandler-extras-7.3.1.jar and paste in previously created directory.
  9. Download mySQL Connector/J from https://dev.mysql.com/downloads/connector/j/5.1.html
  10. Copy and paste the extracted *-bin.jar file in the previously created directory.
  11. Navigate to \server\solr\<core-name>\conf\solrconfig.xml and add
    <lib dir="../../../jarfiles" regex=".*\.jar" />
    and
    <requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
        <lst name="defaults">
            <str name="config">db-data-config.xml</str>
        </lst>
    </requestHandler>
    within the <config> tag
  12. Create a db-data-config.xml file in ./conf and paste with correct, password, etc..
    <dataConfig>
        <dataSource driver="com.mysql.jdbc.Driver"  url="jdbc:mysql://localhost:3306/skill_tracker" user="root"  password="*************" />
        <document>
            <entity name="employee" query="SELECT ID, FN, LN, DOB, DOJ, CL, ADDRESS, CITY, STATE, ZIPCODE, CREATED, UPDATED FROM employee">
                <field column="ID" name="Id" />
                <field column="FN" name="firstName" />
                <field column="LN" name="lastName" />
                <field column="DOB" name="dateOfBirth" />
                <field column="DOJ" name="dateOfJoin" />
                <field column="CL" name="careerLevel" />
                <field column="ADDRESS" name="address" />
                <field column="CITY" name="city" />
                <field column="STATE" name="state" />
                <field column="ZIPCODE" name="zipcode" />
                <field column="CREATED" name="created" />
                <field column="UPDATED" name="updated" />
                <entity name="skill" pk="SKILLID" query="SELECT * FROM skill WHERE ID='${employee.ID}'">
                    <field column="SKILL" name="skills" />
                </entity>
            </entity>
        </document>
    </dataConfig>
  13. In ./managed-schema add field tags with correct fields
    <field name="Id" type="text_general" indexed="true" stored="true" required="true" multiValued="false"/>
    <field name="firstName" type="text_general" indexed="true" stored="true"/>
    <field name="lastName" type="text_general" indexed="true" stored="true" />
    <field name="dateOfBirth" type="text_general" indexed="true" stored="true"/>
    <field name="dateOfJoin" type="text_general" indexed="true" stored="true"/>
    <field name="careerLevel" type="text_general" indexed="true" stored="true"/>
    <field name="address" type="text_general" indexed="true" stored="true"/>
    <field name="city" type="text_general" indexed="true" stored="true"/>
    <field name="state" type="text_general" indexed="true" stored="true"/>
    <field name="zipcode" type="text_general" indexed="true" stored="true"/>
    <field name="created" type="text_general" indexed="true" stored="true" multiValued="false"/>
    <field name="updated" type="text_general" indexed="true" stored="true"/>
    <field name="skills" type="string" indexed="true" stored="true" multiValued="true"/>
    
    <fieldType name="word_concate" class="solr.TextField" indexed="true" stored="false">
    	<analyzer>
        	<charFilter class="solr.PatternReplaceCharFilterFactory" pattern="\s*" replacement=""/>
            <tokenizer class="solr.StandardTokenizerFactory"/>
        </analyzer>
    </fieldType>
    <field name="cfname" type="word_concate"/>
    <copyField source="careerLevel" dest="cfname"/>
    <field name="skillsNoSpaces" type="word_concate" multiValued="true"/>
    <copyField source="skills" dest="skillsNoSpaces"/>
  14. Open browser, and go to http://localhost:8983/solr/#/
  15. To stop solr, run solr stop -all
  16. To restart solr, run solr start

skilltracker-app's People

Contributors

gkizior avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

sanskritisaluja

skilltracker-app's Issues

Create end-points for Skill

  • End-point for deleting skills
  • End-point for adding skills
  • End-point for deleting all skills of a employee
  • End-point for adding skill to list of employees

Create end-points for getting Skill data

  • Ability to get list of Solr objects by career level and skill name
  • Ability to get all career levels
  • Ability to get the total number employees at a certain career level
  • Update solr schema for careerLevel so that querying a string with a space does not fail

Create end-points for Solr

  • Ability to get all employees
  • Ability to query employees by skill
  • Ability to query employees by any field
  • Ability to get data for stat page graphs
  • Ability to get data for skill page graph

AOP/Solr integration

  • Ability for solr to re-index when there is a change to employee
  • Ability for solr to re-index when there is a change to skill

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.